From higher precedence on top, the order of java operator (OCAJP scope) precedence are:
- Post-unary operators x++, x--
- Pre-unary operators ++x, --x
- Other unary operators +, -, !
- Multiplication/Division/Modulus *,/,%
- Addition/Subtraction +, -
- Relational operators <,>,<=,>=
- Equal to/not equal to ==, !=
- Logical operators &, ^, |
- Short-circuit logical operators &&, ||
- Ternary operators boolean expression ? expression1 : expression2
- Assignment operators =, +=, -=