62,614
社区成员
发帖
与我相关
我的任务
分享
<table border="1">
<tr>
<th>Priority</th>
<th>Operator</th>
<th>Operation</th>
<th>Order of Evaluation</th>
</tr>
<tr>
<td rowspan="3">1</td>
<td><code>[ ]</code></td>
<td>Array index</td>
<td rowspan="3">Left to Right</td>
</tr>
<tr>
<td><code>()</code></td>
<td>Method call</td>
</tr>
<tr>
<td><code>.</code></td>
<td>Member access</td>
<tr>
<td rowspan="7">2</td>
<td><code>++</code></td>
<td>Prefix or postfix increment</td>
<td rowspan="7">Right to Left</td>
</tr>
<tr>
<td><code>--</code></td>
<td>Prefix or postfix decrement</td>
</tr>
<tr>
<td><code>+ -</code></td>
<td>Unary plus, minus</td>
</tr>
<tr>
<td><code>~</code></td>
<td>Bitwise NOT</td>
</tr>
<tr>
<td><code>!</code></td>
<td>Boolean (logical) NOT</td>
</tr>
<tr>
<td><code>(type)</code></td>
<td>Type cast</td>
</tr>
<tr>
<td><code>new</code></td>
<td>Object creation</td>
<tr>
<td rowspan="1">3</td>
<td><code>* / %</code></td>
<td>Multiplication, division, remainder</td>
<td rowspan="1">Left to Right</td>
<tr>
<td rowspan="2">4</td>
<td><code>+ -</code></td>
<td>Addition, subtraction</td>
<td rowspan="2">Left to Right</td>
</tr>
<tr>
<td><code>+</code></td>
<td>String concatenation</td>
<tr>
<td rowspan="3">5</td>
<td><code><<</code></td>
<td>Signed bit shift left to right</td>
<td rowspan="3">Left to Right</td>
</tr>
<tr>
<td><code>>></code></td>
<td>Signed bit shift right to left</td>
</tr>
<tr>
<td><code>>>></code></td>
<td>Unsigned bit shift right to left</td>
<tr>
<td rowspan="3">6</td>
<td><code>< <=</code></td>
<td>Less than, less than or equal to</td>
<td rowspan="3">Left to Right</td>
</tr>
<tr>
<td><code>> >=</code></td>
<td>Greater than, greater than or equal to</td>
</tr>
<tr>
<td><code>instanceof</code></td>
<td>Reference test</td>
<tr>
<td rowspan="2">7</td>
<td><code>==</code></td>
<td>Equal to</td>
<td rowspan="2">Left to Right</td>
</tr>
<tr>
<td><code>!=</code></td>
<td>Not equal to</td>
<tr>
<td rowspan="2">8</td>
<td><code>&</code></td>
<td>Bitwise AND</td>
<td rowspan="2">Left to Right</td>
</tr>
<tr>
<td><code>& </code></td>
<td>Boolean (logical) AND</td>
<tr>
<td rowspan="2">9</td>
<td><code>^</code></td>
<td>Bitwise XOR</td>
<td rowspan="2">Left to Right</td>
</tr>
<tr>
<td><code>^ </code></td>
<td>Boolean (logical) XOR</td>
<tr>
<td rowspan="2">10</td>
<td><code>|</code></td>
<td>Bitwise OR</td>
<td rowspan="2">Left to Right</td>
</tr>
<tr>
<td><code>| </code></td>
<td>Boolean (logical) OR</td>
<tr>
<td rowspan="1">11</td>
<td><code>&&</code></td>
<td>Boolean (logical) AND</td>
<td rowspan="1">Left to Right</td>
<tr>
<td rowspan="1">12</td>
<td><code>||</code></td>
<td>Boolean (logical) OR</td>
<td rowspan="1">Left to Right</td>
<tr>
<td rowspan="1">13</td>
<td><code>? :</code></td>
<td>Conditional</td>
<td rowspan="1">Right to Left</td>
<tr>
<td rowspan="2">14</td>
<td><code>=</code></td>
<td>Assignment</td>
<td rowspan="2">Right to Left</td>
</tr>
<tr>
<td><code>*= /= += -= %= <br />
<<= >>= >>>= <br />
&= ^= |=</code></td>
<td>Combinated assignment <br />
(operation and assignment)</td>
</table>