x = a / b * c
can be written x = (a / b) * c
a += b -= c
can be written a += (b -= c)
Operator | Description | Associativity |
---|---|---|
[] . ()
|
Array element access Object member access Method call |
Left to right |
++ -- |
Post increment Post decrement |
|
! ~ ++ -- + - () new
|
Logical NOT Bitwise NOT Pre increment Pre decrement Unary plus Unary minus Cast Instantiation |
Right to left |
* / %
|
Multiplication Division Remainder |
Left to right |
+ - +
|
Additive Subtraction String concatenation |
Left to right |
<< >> >>>
|
Signed left shift Signed right shift Unsigned right shift |
Left to right |
< <= > >= instanceof
|
Less than Less than or equal to Greater than Greater than or equal to Type Comparison |
Left to right |
== !=
|
Equal to Not equal to |
Left to right |
& |
Bitwise AND | Left to right |
^ |
Bitwise XOR | Left to right |
| |
Bitwise OR | Left to right |
&& |
Conditional AND | Left to right |
|| |
Conditional OR | Left to right |
?: |
Ternary | Right to left |
= += -= *= /= %= &= |= ^= <<= >>= >>>=
|
Right to left |