Java break statement is seen inside the loop, the loop is immediately terminated, and the program control resumes at the next statement, which is following the loop. It can be used to terminate the case in the switch statement. Until now, we have already seen the  while and  do-while loop in Java.

Java Break Statement

When a break statement is seen inside any loop, a loop is immediately terminated, and that program control resumes at the next statement which is following the loop.

The Java break is used to break the loop or switch statement. It breaks the current flow of a program at the specified condition. In the case of the inner loop, it breaks the only inner loop.

#java #java break

Java Break Statement Example | Break in Java Tutorial
2.10 GEEK