- The function of break is to interrupt the executed code and exit the current loop.
- When there is a break in each case, a switch loop will be launched when a matching switch value is encountered.
- When there is no break in each loop, it will judge whether there is a matching value. When it encounters a value that matches the switch, it will enter the execution code. At that time, the subsequent case code will not be judged, and will be executed all unless encountered Break will exit the loop.
Why does swing need to use break
Guess you like
Origin blog.csdn.net/springlan/article/details/100678243
Recommended
Ranking