Java operator precedence

OperatorsPrecedence

postfix

expr++ expr--

unary

++expr --expr +expr -expr ~ !

multiplicative

* / %

additive

+ -

shift

<< >> >>>

relational

< > <= >= instanceof

equality

== !=

bitwise AND

&

bitwise exclusive OR

^

bitwise inclusive OR

|

logical AND

&&

logical OR

||

ternary

? :

assignment

= += -= *= /= %= &= ^= |= <<= >>= >>>=

References

Last updated