Break Statement In Java

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.

Syntax:

break;

Break Statement Sample Program:

Break Statement within Switch Case:

Refer Switch Case Statement.

Break Statement with inner loop:

Must Read: Java Tutorial

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Leave a Comment

Share via
Copy link
Powered by Social Snap