Professional Documents
Culture Documents
Break Continue
Break Continue
1
Break and Continue with the nested loop
2
Break as a form goto
A break statement exits a loop before
an entry condition fails.
The break statement can also be
employed by itself to provide a form
of “goto”. The format is:
break label:
3
Example – use break to exit from loop
4
Continue - Explanation
5
Example - continue
6
Return
7
Example
8
Summary
Selection Statements
If and switch
Iteration Statements
While, do-while, for and nested
loops
Jump Statements
Break, continue and return