This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
A break statement with label Identifier attempts to transfer control to the enclosing labeled statement (�14.7) that has the same Identifier as its label; this statement, which is called the break target, then immediately completes normally.
So, you're right when you say that the target is the do loop. However, that do loop ends abruptly and we continue with the next iteration of the outer loop. That's why we end up flowing directly into the next iteration of the outer loop. I hope that helps, Corey
hi val, x++ will get executed when you have continue there instead of break.,break statement takes you out of the loop,higher up to the next label which is in higher order., i have changed ur code little bit here ... see this...HTH
please use the [code][/code] tags when showing code. visit <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank" rel="nofollow">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page</a> ,for more details