The Java operator is divided into four categories:
Arithmetic Operators , Relational Operators , logical Operators , bit operators.
Arithmetic operator: +-*/% + +--
Relational operators: = = = = > >= < <=
Logical operator:&& | | ! ^ & |
Bitwise operator:& | ~ ^ >> << >>>
****************************************************************
Java Basic data type:
Integer: Byte, short, int, long
Non-integral type: double, float
Non-numeric type: char[characters], boolean[Boolean]
***************************************************************
One: Arithmetic operators:
?: the arithmetic operator operand must be a numeric type .
Is divided into a unary operator and a two-tuple operator;
Unary operator with only one operand;
The binary operator has two operands, and the operator is between two operands.
Unary operators: Positive ' + ', minus '-', self-adding ' + + ', self-subtraction '--' these four.
The "+ +" and "--" operators, which allow only variables of numeric type, are not allowed in expressions;
"+ +" and "--" can be used before or after a numeric variable;
Difference between two uses:
"+ +" and "--" before the numeric variables, in the assignment operation, the value of "+ +" or "--" action variable values first added 1 or minus 1, and then do other operations;
After the "+ +" and "--" are used for numeric variables, in the assignment operation, the value of the operation variable of "+ +" or "--" is first used for other operations, and then the value is added 1 or minus 1.
Arithmetic operators, relational operators, logical operators, bitwise operators for Java