JAVA運算子的優先順序
優先順序
|
運算子
|
↑最高
|
()
|
++,--,!,-,~
| |
*,/,%
| |
+,-
| |
| <<,>>,>>> | |
==,!=
| |
&
| |
︿
| |
|
| |
&&
| |
||
| |
?:
| |
↓最低
| =,*=,/=,%=,+=,- =,<<=,>>=,>>>=,&=,|=,^= |
參考:http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
優先順序
|
運算子
|
↑最高
|
()
|
++,--,!,-,~
| |
*,/,%
| |
+,-
| |
| <<,>>,>>> | |
==,!=
| |
&
| |
︿
| |
|
| |
&&
| |
||
| |
?:
| |
↓最低
| =,*=,/=,%=,+=,- =,<<=,>>=,>>>=,&=,|=,^= |
參考:http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
沒有留言 :
張貼留言