Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Chapter 5, we discussed Java’s break and continue statements, which enable programmers to alter the flow of control in control statements. Java also provides the labeled break and continue statements for cases in which a programmer needs to conveniently alter the flow of control in nested control statements. This appendix demonstrates the labeled break and continue statements with examples using nested for statements.