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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
Question
Rahul Bhosale
Ranch Hand
Posts: 77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public class LabelledWhile { public static void main(String[] args) { int i = 0; int j = 0; outer: while(check(i)) inner: while(check(j)) if(i++%5 == 0 & check(i)) continue inner; else break outer; } static boolean check(int a){ System.out.println(a); return a<10; } }
Choose 1 correct answer.
1. 0 0 1 0
2. 0 0 1 0 2
3. 0 0 1 0 1
4. 0 0 1 0 3
RB
Mike Gershman
Ranch Hand
Posts: 1272
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
0
0
1
0
2
Mike Gershman
SCJP 1.4, SCWCD in process
Rahul Bhosale
Ranch Hand
Posts: 77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yes siree..
RB
miguel lisboa
Ranch Hand
Posts: 1282
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i compiled too, but,
what's outer: and inner: ?
TiA
java amateur
Rahul Bhosale
Ranch Hand
Posts: 77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
outer and inner are just labels which you can use to control the flow of loops. you can use it for while and for loops.
RB
miguel lisboa
Ranch Hand
Posts: 1282
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i was just googlin'n googling...
now i checked 'label' at thinking in
java
- that's it!
thanks
java amateur
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Loop Problem
cert study guide problem
Marcus Green Mock #1 Q 21
plz exaplin me this Prog
why does 'break' traverse one more time
More...