Java provides six language constructs for transferring control in a program:
This section discusses the first three statements, and the remaining statements are discussed in subsequent sections.
Note that Java does not have a goto statement, although goto is a reserved word.
A statement may have a label.
<label> : <statement>
A label is any valid identifier and it always immediately proceeds the statement. Label names exist in their own name space, so that they do not conflict with names of packages, classes, interfaces, methods, fields, and local variables. The scope of a label is the statement prefixed by the label, meaning that it cannot be redeclared ...