Page Stats
Visitor: 200
Java Operator Precedence and Associatively
The Priority or Precedence in which the operators are to be performed is known as operator precedence. The associativity specifies the operators direction to be evaluated, it may be left-to-right or right-to-left.
Rank | Operator | Associatively |
---|---|---|
() , [] | Left to Right | |
++ , -- | Right to Left | |
* , / , % | Left to Right | |
+ , - | Left to Right | |
<< , >> , >>> | Left to Right | |
< , <= , > , >= | Left to Right | |
== , != | Left to Right | |
& | Left to Right | |
^ (XOR) | Left to Right | |
| | Left to Right | |
&& | Left to Right | |
|| | Left to Right | |
? : | Right to Left | |
= | Right to Left |