Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Programmer Certification (OCPJP)
Puzzled with the output of this programme
sid noob
Greenhorn
Posts: 4
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
class Circles { public static void main(String[] args) { int[] ia = {1,3,5,7,9}; for(int x : ia) { for(int j = 0; j < 3; j++) { if(x > 4 && x < 8) continue; System.out.print(" " + x); if(j == 1) break; continue; } continue; } } }
Output
113399
Please someone explain to me how the values are not 139 but 113399; I am sure am wrong in interpretation of the loop construct, please correct me with an explanation.
Thanks.
sid noob
Greenhorn
Posts: 4
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I managed to get my head clear, i understood the problem. Thanks anyway.
Regards,
JavaNoob
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
please explain the program
Doubt in break and continue statements
Sub: Arrays
Doubt in assertion
Priority queue
More...