Java Reference
In-Depth Information
appendix
A
operators
Figure A.1 shows the precedence and associativity of the common Java oper-
ators discussed. The bitwise operators are discussed in Appendix C.
figure A.1
Java operators listed
from highest to lowest
precedence
Category
Examples
Associativity
. []
Operations on References
Left to right
Unary
++ -- ! - (type)
Right to left
* / %
Multiplicative
Left to right
+ -
Additive
Left to right
<< >>
Shift (bitwise)
Left to right
< <= > >= instanceof
Relational
Left to right
== !=
Equality
Left to right
&
Boolean (or bitwise) AND
Left to right
^
Boolean (or bitwise) XOR
Left to right
|
Boolean (or bitwise) OR
Left to right
Logical AND
&&
Left to right
Logical OR
||
Left to right
?:
Conditional
Right to left
= *= /= %= += -=
Assignment
Right to left
 
Search WWH ::




Custom Search