Java Reference
InDepth Information
Precedence with
Rank
Operator
Type
Associativity
()
[]
ยท
Parentheses
Array subscript
Member selection
1
Left to Right
++

Unary postincrement
Unary postdecrement
2
Right to left
++

+

!
~
(
type
)
Unary preincrement
Unary predecrement
Unary plus
Unary minus
Unary logical negation
Unary bitwise complement
Unary type cast
3
Right to left
*
/
%
Multiplication
Division
Modulus
4
Left to right
+

Addition
Subtraction
5
Left to right
Bitwise left shift
Bitwise right shift with sign
extension
Bitwise right shift with zero
extension
<<
>>
>>>
6
Left to right
Relational less than
Relational less than or equal
Relational greater than
Relational
<
<=
>
>=
instanceof
7
greater
than
or
Left to right
equal
Type
comparison
(objects
only)
==
!=
Relational is equal to
Relational is not equal to
8
Left to right
9
&
Bitwise AND
Left to right
10
^
Bitwise exclusive OR
Left to right