Java operator precedence

Operators can be computed first, or later, depending on their priority. Because priority can affect the outcome of your code, it is best to write code that takes into account the operator’s priority, if possible.

Priority Operator
1 (), []
2 ++, –, ~, !
3 *, /, %
4 +, –
5 >>, >>>, <<
6 >, >=, <, <=
7 ==, !=
8 &
9 ^
10 &&
11 ||
12 ?, :
13 =, op=

Share This Post

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

Latest Post