分类: Java
2010-07-15 13:45:20
Hist:
1007015, draft
Evaluation, Denotation, and Result
Variables as Values
Type of an Expression
FP-strict Expressions
Expressions and Run-Time Checks
Normal and Abrupt Completions of Evaluation
Evaluation Order
Evaluate Left-Hand Operand First
Evaluate Operands before Operation
Evaluation Respects Parentheses and Precedence
Argument Lists are Evaluated Left-to-Right
Evaluation Order for Other Expression
Primary Expressions
Class Instance Creation Expressions
Array Creation Expressions
Field Access Expressions
Method Invocation Expressions
Array Access Expressions
Postfix Expressions
Unary Operators
Cast Operators
Multiplicative Operators
Additive Operators
Additive Operators
Shift Operators
left shift <<, signed right shift >>, and unsigned right shift >>>.
Relational Operators
< > <= >= instanceof
Equality Operators
== !=
If the operands of an equality operator are both of either reference type or the null type, then the operation is object equality. At runtime, the result of == is true if the operand values are both null or both refer to the same object or array; otherwise, the result is false. While == may be used to compare references of type String, such an equality test determines whether or not the two operands refer to the same String object. The content of two strings s and t can be tested for equality by the method invocation s.equals(t).
Bitwise and Logical Operators
& ^ |
Conditional-And Operator &&
Conditional-Or Operator ||
Conditional Operator ?:
Assignment Operators
= *= /= %= += -= <<= >>= >>>= &= ^= |=
REF
1. JLS 3nd