It does what you dont think it does.
break is used with the conditional switch statement and with the do, for, and
while loop statements.
In a switch statement, break causes the program to execute the next statement
after the switch. Without a break statement, every statement from the matched
case label to the end of the switch, including the default, is executed.
In loops, break terminates execution of the nearest enclosing do, for, or
while statement. Control passes to the statement that follows the terminated
statement, if any.
Within nested statements, the break statement terminates only the do, for,
switch, or while statement that immediately encloses it. You can use a
return or goto statement to transfer control from within more deeply nested
structures.
Some links from SO which will be helpful.
- Break from nested loops
- Controlling nested loops
The above text is from this link.