Chapter 7 : Review
同一个作用域范围的包裹下局部变量和局部变量不可以变量名相同(作用域内不能重复命名).
You can't use the instanceof operator to test across two different class hierarchies.
Precedence Hierarchy of Common Operators (from Highest to Lowest)

Java law decrees that an else clause belongs to the innermost if statement to which it might possibly belong
A switch’s expression must evaluate to a char, byte, short, int, an enum (as of Java 5), and a String (as of Java 7).
the case constant must be a compile-time constant. you can use only a constant or final variable that is immediately initialized with a literal value. It is not enough to be final; it must be a compile- time constant.
case constants are evaluated from the top down, and the first case constant that matches the switch’s expression is the execution entry point.
break statements must be used inside either a loop or a switch statement, cannot be used in if statement.
continue statements must be inside a loop
Labeled continue and break statements must be inside the loop that has the same label name; otherwise, the code will not compile.

浙公网安备 33010602011771号