Java Reference
In-Depth Information
A PPENDIX C
Operator Precedence Chart
The operators are shown in decreasing order of precedence from top to bottom. Operators in
the same group have the same precedence, and their associativity is shown in the table.
Operator
Name
Associativity
()
Parentheses
Left to right
()
Function call
Left to right
Array subscript
Left to right
[]
.
Object member access
Left to right
++
Postincrement
Left to right
--
Postdecrement
Left to right
Preincrement
Right to left
++
--
Predecrement
Right to left
+
Unary plus
Right to left
-
Unary minus
Right to left
Unary logical negation
Right to left
!
(type)
Unary casting
Right to left
new
Creating object
Right to left
*
Multiplication
Left to right
Division
Left to right
/
Remainder
Left to right
%
+
Addition
Left to right
-
Subtraction
Left to right
<<
Left shift
Left to right
Right shift with sign extension
Left to right
>>
>>>
Right shift with zero extension
Left to right
<
Less than
Left to right
<=
Less than or equal to
Left to right
Greater than
Left to right
>
>=
Greater than or equal to
Left to right
instanceof
Checking object type
Left to right
1268
 
 
 
 
Search WWH ::




Custom Search