Java Reference
In-Depth Information
Precedence
Level
Operator
Operation
Associates
[]
.
( parameters )
++
--
1
array indexing
object member reference
parameter evaluation and method invocation
postfix increment
postfix decrement
L to R
++
--
+
-
~
!
R to L
2
prefix increment
prefix decrement
unary plus
unary minus
bitwise NOT
logical NOT
new
( type )
R to L
3
object instantiation
cast
*
/
%
L to R
4
multiplication
division
remainder
5
+
+
-
addition
string concatenation
subtraction
L to R
<<
>>
>>>
6
left shift
right shift with sign
right shift with zero
L to R
<
<=
>
>=
instanceof
L to R
7
less than
less than or equal
greater than
greater than or equal
type comparison
==
!=
8
equal
not equal
L to R
&
&
L to R
9
bitwise AND
boolean AND
ˆ
ˆ
L to R
10
bitwise XOR
boolean XOR
L to R
11
|
|
bitwise OR
boolean OR
12
&&
logical AND
L to R
||
13
logical OR
L to R
FIGURE D.1 Java operator precedence
 
Search WWH ::




Custom Search