From http://www.cnblogs.com/ggjucheng/archive/2012/12/14/2817915.html
English from http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
After learning how to declare and initialize variables, you may want to know how to use them. Learning Java language operators is a good start point. An operator is a special symbol that gives one, two, or three operands a specific operation and returns the result.
When we explore JavaProgramming LanguageIt is very useful to know in advance that the operator has a priority. According to the priority order, the following table lists all operators. The closer the operator to the top, the higher the priority. High-priority operators, such as lower-priority operators, are computed first. Operators of the same row have equal priority. When operators with equal priorities appear in the same expression, the rule determines which operator to calculate first. In addition to the binary operators of the value assignment operator, the value assignment operator is calculated from left to right, and the value assignment operator is calculated from right to right.
Operator priority
Operator |
Priority |
Suffix |
Expr++Expr-- |
RMB 1 |
++Expr--Expr+Expr-Expr~ ! |
Multiplication |
*/% |
Addition |
+- |
Shift |
<>>>> |
Comparison |
<> <=> = Instanceof |
Equal |
=! = |
Bitwise AND |
& |
Bitwise OR |
^ |
Or operation |
| |
Logic and |
&& |
Logic or |
| |
Sanyuan |
? : |
Assignment |
= + =-= * =/= % = <<=>>>>> = |
In most programming, some operators appear more frequently. For example, the value assignment operator "=" is far from the unsigned right shift operator">>>
". For this reason, we will discuss the most common operators in the general foundation, without paying attention to the rarely used operators.