Java Break

Many programming languages like c, c++ uses the "break" statement. Java also use this statement when we need to exit from a loop before the completion of the loop.

Java Break

Java Break

     

Many programming languages like c, c++ uses the "break" statement. Java also use this statement when we need to exit from a loop before the completion of the loop. When this statement executes the control jumps out of a loop and comes to the next statement following the loop statement. Break is one of the controlling statement like continue and return. Break statement can be used in while loop, do - while loop, for loop and in switch statement.

Read more at:

http:/www.roseindia.net/java/beginners/Break.shtml