1. Sequential structure
1.if statements
(1) Legend
(2) Three formats
A: Format 1
B: Format 2
C: Format 3
2.swich statements
Legend:
Format:
"Note" Input can be an enumeration after Byte,short,int,char;jdk5; JDK7 can be a string later;
3. Looping statements
Legend:
(1) For loop
(2) While loop
Legend:
Usage:
(3) Do...while cycle
Legend:
Usage:
(4) difference between for and while
A: the difference in use
The control condition variable for the For statement can no longer be used after the loop has ended, while the while continues to use the
B: The difference in understanding
"For a range of judgments, while suitable for loops with ambiguous times"
(5) The difference of three kinds of cycles
A:do...while Loop performs at least one loop body
The b:for and while must first determine if the condition is true before deciding whether to execute the loop
4. Controlling Jump Statements
(1) Break: Meaning of the Interruption
A: Used in loops and switch statements, leaving the sub-scenario meaningless
B: function:
"A. Jumping out of a single-layer loop"
"B. Jumping out of a multilayer loop, requiring a mate of a label statement"
(2) Continue: Continue
Function: Jump out of a loop and go to the next execution
(3) Return: Back
A: Used to end the execution of the method
B: Must have encountered return, the program will not be executed back
Java Series Learning (v)-Process Control statements