One, operator
1) '/' division operator
A) If it is divided by two integers, take only the integer quotient, such as 7/2=3
b) If the number is divided by a floating-point number, the floating-point number is a quotient, such as 7/2f=3.5
2) Self-increment, decrement operator "+ +""--"
A) operands using the self-increment or decrement operator must be integers or floating-point numbers,char and Boolean cannot use "+ +""-- "
3) Comparison operators, note the desirable types of operands of these operators
4) Logical operators &&,&,| | ,!
A) operands of these logical operators must be of type Boolean
b) && and & both represent logic and, but the two operators are different, the former is a short-circuit operator, sometimes omit some of the calculation steps,
5) Bitwise operator
A) & | ~ ^ Bitwise XOR (two values do not simultaneously result 1) << >> >>> unsigned Right shift
b) << left shift, left to move empty partial complement 0
c) >> right SHIFT, signed right SHIFT, if the highest bit is 1, the right part of the blank is shifted 1
If the highest bit is 0, the right part of the blank is shifted 0
d) >>>, right shift, unsigned right shift, whether the change is 0 or 1, the right to move the empty part of the complement 0
e) The operand types that the shift operator applies to are byte, short,int,long, Char
f) A number <<n bit, equivalent to this time multiplied by 2^n; a number >>n , equivalent to this number divided by 2. ^n
Ii. precedence of Operators
Overview: Operators have a certain priority and priority determines the order of execution
If two operators in the same expression have the same precedence, the left-behind operator is executed.
When programming, you should use parentheses to limit the order of operations, so as to avoid errors.
Java basic----> operators and their precedence