Section |
Category |
Operators |
14.5 |
Primary |
x.y f(x) [x] x++ x-- newtypeof checked unchecked |
14.6 |
Unary |
+ - ! ~ ++x --x (T)x |
14.7 |
Multiplicative |
* / % |
14.7 |
Additive |
+ - |
14.8 |
Shift |
<< >> |
14.9 |
Relational andtype-testing |
< > <= >= is as |
14.9 |
Equality |
== != |
14.10 |
Logical AND |
& |
14.10 |
Logical XOR |
^ |
14.10 |
Logical OR |
| |
14.11 |
Conditional AND |
&& |
14.11 |
Conditional OR |
|| |
14.12 |
Conditional |
?: |
14.13 |
Assignment |
= *= /= %= +-= -= <<= >>= &= ^= |= |
When an expression contains multiple operators, the precedence of the operators controls the order in which the individual operators are evaluated. For example, the expression x + y * z is evaluated as x + (y * z) because the * operator has higher precedence than the + operator.