A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

Java operators and precedence

------------------------------------------------------------------------------|
|Operator|                                          |Precedence|
------------------------------------------------------------------------------|
postfix                                        exp++   exp--
unary                                          ++exp   --exp
                                                   +exp    -exp  ~ !
------------------------------------------------------------------------------|
Multiplicative                             *   /   %
------------------------------------------------------------------------------|
additive                                       +  -
------------------------------------------------------------------------------|
shift                                             <<  >>  >>>
------------------------------------------------------------------------------|
Relational                                    < > <=  >=   instance of
------------------------------------------------------------------------------|
equality                                        ==    !=
------------------------------------------------------------------------------|
bitwise AND                                &
bitwise exclusive OR                   ^
bitwise inclusive OR                    |
logical AND ternary                     ?:
------------------------------------------------------------------------------|
Assignment                                  =   +=   *=  /=  %=  &= ^= \=
                                                     <<=    >>+    >>>=
------------------------------------------------------------------------------|











LEARN TUTORIALS

.

.