I. Operators and expressions
1) Arithmetic: +-*/% + +--
2) Relationship:> < >= <= = = =!
3) Logic:&& | | !
4) Assignment: = + = = *=/=%=
5) String Connection: +
6) Three Mesh/condition: Boolean? Number 1: Number 2
Two. Branching structure
1) if
2) If...else
3) If...else If
4) Switch...case
Advantages: Clear structure and high efficiency
Cons: Integers, equal
Break: Jump out of switch
Three. Cyclic structure
1. Cyclic three elements:
1) Initialization of cyclic variables
2) Conditions of the loop (based on the cyclic variable)
3) changes in cyclic variables (toward the end of the cycle)
Cyclic variable: The amount of change in the loop process
2. Loop structure:
1) While: first judgment after execution, it is possible not to execute at once
2) Do...while: First execution after judgment, at least once
Tip: When the 1th element is the same as the 3rd element, the preferred
3) for: Highest application rate
3. Break: Jump out of the loop
Continue: Skips the remaining statements in the loop body and goes to the next loop
Contrast:
1) Sequential structure: Execute from top to bottom, every sentence must go
2) Branching structure: Conditional execution of a statement once, not every sentence must go
3) Loop structure: Conditional execution of a statement multiple times, not every sentence must go
Java------Operators, branching structures, looping