sample on illegal use of labeled continue and break
Joined: Jan 01, 2007
(Sorry I forgot to quote my source. Anyway, I'm posting it now. )
This is from Chapter 5 (p. 344) of the K&B Book:
Labeled continue and break statements must be inside the loop that has the same label name; otherwise, the code will not compile.
I'm a little lost on this statement. Can anyone give a sample regarding the statement? I'm trying to make my sample code not compile but it compiles fine if I use two different labels - outer and inner.
This program is an exercise from the same page, modified a little for my own experimentation.
Thank you very much in advance!
[ June 25, 2008: Message edited by: Denise Saulon ]
[ June 25, 2008: Message edited by: Denise Saulon ] [ June 25, 2008: Message edited by: Denise Saulon ]
SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCPJBCD in progress