Java Reference
In-Depth Information
APPENDIX B
O PERATOR
P RECEDENCE
The following table shows the precedence of operators in Java from highest to lowest,
and their associativity.
Operator
Description
Precedence Level
Associativity
.
Object member access
1
Left to right
[]
Array subscripting
1
Left to right
(parameters)
Method call
1
Left to right
Postincrement
1
Left to right
++
--
Postdecrement
1
Left to right
++
Preincrement
2
Right to left
--
Predecrement
2
Right to left
+
Unary plus
2
Right to left
-
Unary minus
2
Right to left
!
Logical not
2
Right to left
Bitwise not
2
Right to left
new
Object instantiation
3
Right to left
(type)
Type conversion
3
Right to left
Multiplication
4
Left to right
*
/
Division
4
Left to right
%
Remainder (modulus)
4
Left to right
941
 
 
Search WWH ::




Custom Search