Java's Precedence Order
As an example, in the expression
( dollars * 100 + cents )
multiplication will be executed first in an expression since its
precedence number is 12, bigger than addition's 11.
| Operator | Description | Precedence Number |
| ++, -- | post-increment, post-decrement | 16 |
| ++, -- | pre-increment, pre-decrement | 15 |
| ~ | bitwise complement | 14 |
| ! | logical complement | 14 |
| +, - | numerical signs | 14 |
| ( typename ) | type conversions, casting | 13 |
| *, /, % | multiplication, division,
remainder |
12 |
| +, - | addition, subtraction | 11 |
| <<, >>, >>> | bit shifts | 10 |
| <, <=, >, >= | relational | 9 |
| ==, != | equality | 8 |
| & | bitwise AND | 7 |
| ^ | bitwise EXCLUSIVE OR | 6 |
| | | bitwise INCLUSIVE OR | 5 |
| && | conditional-and | 4 |
| || | conditional-or | 3 |
| ?, : | if, else expression | 2 |
| =, +=, -=, *=, /= | assignment | 1 |