JAVA-break、continue

JAVA-break、continue


break

In the main part of any loop statement, break can be used to control the flow of the loop.

Break is used to forcibly exit the loop without executing the remaining statements in the loop. (The break statement is also used in the switch statement)


continue

The continue statement is used to terminate a loop process in the recycle statement body, that is, skip the statements that have not been executed in the loop body. Then it is determined whether to execute the loop next time.

Guess you like

Origin blog.csdn.net/qq_39453420/article/details/108313961