google Ads

Monday, July 13, 2009

Branching Statement

Branching Statement

You saw the break statement in action within the switch statement earlier. As noted there, break causes the flow of control to jump to the statement immediately following the current statement.
Another from of the break statement causes flow of control to break out of a labeled statement. You label a statement by placing a legal Java identifier (the label) followed by a colon ( : ) before the statement:

Syntax:
StatementName: someJavaStatement

break Statement
continue Statement
Return Statement

No comments:

Post a Comment