Precautions:
- Constants are assigned at compile time, and variables are allocated in memory when they are run.
- Assignment operator + =-+ *+%= \= The Java compiler enforces type conversions
Residual:
In Java, it is time to take the remainder operation, and the sign of the result is determined by the divisor.
logical operators
& | or! Non-^ XOR && short circuit with | | Short Circuit or
Bitwise operators: direct manipulation of bits.
& (with)6 & 3 = 2 0000 0110 can treat 1 as true & 0000 0011 0 as false-- ---------------- 0000 0010 2| (OR) Consistent with on ^ (XOR) and on the same rule: if the operand A is consecutive or the same operand two times, then the result is the operand a~ (take the inverse) binary take the inverse = 8
Shift operators:
<< (left shift) rule: A number of operands to the left is multiplied by 2 n >> (right) an operand is moved to the right, if the operand is a positive number , then the left vacant bit uses 0 complement, and vice versa. >>> (unsigned Right shift) is uniformly used 0 to complement either positive or negative.
Ternary operator: Boolean expression-value 1: value 2;
Basic operators, remainder, logical operators, logical operators, bitwise operators, shift operators in Java