1. Each cycle can be nested with each other
Generally no more than three floors
The outer loop variable changes once, and the inner loop variable is changed again
Note: Number of cycles. (Inner loop number * Outer loop number)
Use of 2.break statements
The break statement terminates a loop and causes the program to jump to the next statement outside the loop block.
The statement after break in the loop is no longer executed, and the loop stops executing.
The break statement can be used not only in the For loop, but also in the while and do-while loops.
The break statement is typically used with an if conditional statement.
3. Use of Continue statements
The continue can be used for a for loop or for a while and do-while loops.
In the For loop, continue causes the program to jump to the iteration section before judging the loop condition.
If true, the next loop is resumed, otherwise the loop is terminated.
In the while loop, when the continue is executed, the program will directly determine the loop condition.
The continue statement can only be used in a looping structure.
4. Comparison:
The break statement terminates a loop, and the program jumps to the next statement outside the loop block.
The continue statement is to jump out of the loop and into the next loop.
5.return terminating the main function
6. Program debugging
Set breakpoints
Single Step operation (F6)
Observing variables
Jen Baby Java Basic Notes Flow control (ii)