This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Break statement when used with label terminates the labelled statement and flow of control is transferred to statement following labelled statement. continue-label statement is used to skip over the current iteration, usually used with nested loops. Continue statement will skip the current iteration but if you have nested loop and you want to skip the iteration for outer loop you can use continue with label.
SCJP 1.4<br />SCWCD 1.3
Joined: Oct 11, 2004
Both will do their work same as they do in case of label also , just one difference is that , they use loop ( for moving control ) which we mentioned by label .
Like in this case break is moving control out of inner loop .
And in this case , we specified which for loop it should use for moving control by label .