Branch control
-
Relational operators and relational expression
Comparison operation implemented>, <, <=,> = priority higher than ==! =
Relational expression true false zero zero
-
Logical and logical expressions
- && || !
Non-logic, arithmetic operators, relational operators, logical AND, logical OR priority increment
-
Judgment ch is an uppercase character
(zh >= 'A') && (zh <= 'Z')
-
Branch structure single, double, multi-branched structure
-
Ternary operator expression 1? Expression 2: Expression 3
-
Compound statement (Compound Statement) {} using the plurality of pieces of content comprising
else is always paired with the nearest if (unpaired) statement
-
-
Switch statement
-
Robustness - Good fault tolerance
-
switch(表达式) { case 常量1: break; case 常量2: break; …… default : }
After the match constant, it will perform all subsequent statements until it encounters a break
Program test, try to cover all branches
-