Explain Operator precedence in Java
Operator Description Associativity ...
https://www.computersprofessor.com/2016/06/explain-operator-precedence-in-java.html
Operator Description Associativity
|
.
Member
selection Left
to right
|
( ) Functional
call Left to right
|
[ ] Array
element reference Left to right
|
- Unary
minus Right
to left
|
++ Increment Right to left
|
! Decrement Right to left
|
~ Ones
complement Right to left
|
(type) Casting Right to left
|
*. Multiplication Left
to right
|
/- Division Left to right
|
% Modulus Left to right
|
+ Addition Left
to right
|
- Subtraction Left to right
|
<< Left
Shift Left
to right
|
>> Right
Shift Left to right
|
>>> Right shift with zero fill 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
|
Instance of
Type
comparison Left to right
|
== Equality Left
to right
|
!= Inequality Left to right
|
& Bitwise
AND Left
to right
|
^ Bitwise
XOR Left
to right
|
½
Bitwise Left
to right
|
&& Logical
AND Left
to right
|
½½ Logical OR Left
to right
|
?: Conditional
operator Right to
left
|
= Assignment
operator Right to
left
|
OP= Shorthand
assignment Right to left
|