In Java, the
break statement causes the execution of a loop to stop. The loop can be a
do...while loop. To understand how to break out of a loop, follow these four steps.
breakstatement is issued. This action will cause the loop to stop, and control resumes with the first statement following the loop.