| Precedence Order | |
| Operator | Associativity |
| () [] -> . | left to right |
| ! ~ ++ -- - (type) * & sizeof | right to left |
| * / % | left to right |
| + - | left to right |
| << >> | left to right |
| < <= > >= | left to right |
| == != | left to right |
| & | left to right |
| ^ | left to right |
| | | left to right |
| && | left to right |
| || | left to right |
| ?: | right to left |
| = += *= etc. | right to left |
| , | left to right |
This table indicates how expressions are grouped. (Think of this table as the guide to how to fully parenthesize expressions.) Often the grouping forces some order of evaluation since a subexpression may need to be evaluated before it can be used as an operand in an enclosing expression. However, this table does not otherwise restrict the evaluation order.
In Java, expression operands are guaranteed to be evaluated left to right, and this includes method arguments. There is no comma operator in Java; commas are used for arguments to methods and in declarations only.
In C and C++, there is no general language guarantee of evaluation order other than the order that is required by grouping. However, there are four operators that do guarantee evaluation order: Logical and (&&) and logical or(||) are guaranteed left to right evaluation, with short circuiting. The comma operator guarantees left to right evaluation. And naturally the conditional operator guarantees evaluation of the leftmost operand first, and then only one of the remaining operands is evaluated. Otherwise, the order is implementation dependent.