Break and continue
Break and continue statement
In this tutorial, we will discuss the Break and Continue statement.
Break statement
Sometimes it is required to do terminate the loop, without verifying test expression. In such cases break statement can be used. The break statement normally used with the conditional switch statement and do, while, or for loop statement. The break statement transfers the flow of control out of the current scope.
Continue statements
Sometimes if the programmer wants to skip a few statements inside the loop. In such cases, continue statements are used. Generally, the continue statement ends the current iteration of the loop.
Visit this link for the full article: https://studyeasy.org/java/break-and-continue-statement/
0 comments