| Category | Associativity | Operators |
|---|---|---|
| Primary | See footnote.1 |
x.y f(x) a[i]
x++ x--
new typeof checked unchecked |
| Unary | Right | + - ! ~ ++x --x (T)2 |
| Multiplicative | Left | * / % |
| Additive | Left | + - |
| Shift | Left | << >> |
| Inequality and Type | Left | < > <= >= is as |
| Equality | Left | == != |
| And | Left | & (Complete evaluation or bitwise) |
| XOr | Left | ^ (Complete evaluation or bitwise) |
| Or | Left | | (Complete evaluation or bitwise) |
| And | Left | && (Short circuit evaluation) |
| Or | Left | || (Short circuit evaluation) |
| Conditional | Right | ? : |
| Assignment | Right |
= *= /= %= += -=
<<= >>= &= ^= |= |
1Parentheses are used for grouping in expressions, casting, method evaluation and method definition.
2Cast operator. T is a type.