Break Statement In Java with Examples

The Break statement in Java is used to break a loop statement or switch statement. The Break statement breaks the current flow at a specified condition.

Break Statement

Note: In case of inner loop, it breaks just the inner loop.



Break Statement Sample Program:

Break Statement within Switch Case:

Refer Switch Case Statement.

Break Statement with inner loop:

Must Read: Java Tutorial

Get our latest blog posts delivered to your inbox

Subscribe and get popular blog posts about software testing industry.


Leave a Comment

Share via
Copy link
Powered by Social Snap