Trying to understand labeled "break" with for loops
posted 14 years ago
Hello Ranchers! I am trying to understand the labeled break with for loops and I wrote a code to try out various things in terms of where the control is actually transfered to from the labeled break statements. My conclusion is: Labeled break is only useful in the nested loop situations. Am I correct? I need your feedback. Also, please check out the following code. It seems that the comiler is unable to detect/catch a unreachable statement.
CTE- Stands for Compile Time Error prt method is taken from Bruce Eckel's book. Looking forward to your input, If you happen to have a good resource besides the JLS for labeled break/continue statements could you please post them? Thanks, Brian