Sunday, November 30, 2008

Break label

Label is the name of a label that identifies a block of code. When this form of break executes, control is transferred out of the named block of code. The labeled dbl.ock of code must enclose the break statement, but it does not need to be immediately enclosing block. This means that you can use a labeled break statement to exit from a set of nested blocks. But the break cannot be used to transfer control to a block of code that does not enclose the break statement. A label is any valid Java identifier followed by a colon. Once a block is labeled, then it can be used as the target of a break statement.

0 comments: