| Author |
do while loop
|
M Srilatha
Ranch Hand
Joined: Aug 27, 2008
Posts: 137
|
|
Hi, Could any one please explain me how the following code works?
I thought the code will not compile! But it compiles as well as runs
|
Thanks,<br />Srilatha M
|
 |
Himanshu Gupta
Ranch Hand
Joined: Aug 18, 2008
Posts: 598
|
|
|
why you thought that this code will not compile? it looks OK. no problem in the code.
|
My Blog SCJP 5 SCWCD 5
|
 |
M Srilatha
Ranch Hand
Joined: Aug 27, 2008
Posts: 137
|
|
Hey thanks for the reply! I got it now. This is how it works! Before i was thinking that line 4 is a do while loop where its actually do in line4 pairs up with while in line 06. I didnt think in that way. Anyways now its clear!
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9191
|
|
I think there will be no output. The code can be thought of as
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
 |
|
|
subject: do while loop
|
|
|