«
Prev
»
Next
Java / Control Statements
Difference between break and continue statements.
| break | continue |
| Can be used in switch and loop (for, while, do while) statements. | Can be only used with loop statements. |
| It causes the switch or loop statements to terminate the moment it is executed. | It doesn't terminate the loop but causes the loop to jump to the next iteration. |
| It terminates the innermost enclosing loop or switch immediately. | A continue within a loop nested with a switch will cause the next loop iteration to execute. |
More Related questions...
Comments & Discussions