Operator Precedence

The following table shows the order of precedence for Java operators, from highest to lowest.

  1. () [] . (Highest)
  2. ++ - - ~ !
  3. * / %
  4. + -
  5. > >>> << ]]>
  6. >= < <= ]]>
  7. == !=
  8. ^
  9. |
  10. ||
  11. ?:
  12. = op= (Lowest)
Home 
  Java Book 
    Language Basics  

Operators:
  1. Operators
  2. Arithmetic Operators
  3. Bitwise Operators
  4. Relational Operators
  5. Boolean Logical Operators
  6. The ? Operator
  7. Operator Precedence