Almost all operators can only operate on basic types, but "=", "= ","! = "All objects can be operated. The string class supports "+", "+ = ".
When performing operations on an object, the Operation references the object. Therefore, assigning an object to another object actually copies the reference from one place to another. For example, if C = D, both C and D point to the object that D points.
% Evaluate the remainder,/Integer Division will directly remove the decimal places of the result, instead of rounding (math. Round ())
- Auto increment and decrease
++ I (increasing prefix) and -- I run the calculation first, then generate the value. I ++ and I -- are values, and then perform the operation.
= And! = Compare objects or basic type values. Equals () compares the actual content of an object.
Unlike C ++, non-boolean values cannot be used as boolean values in logical expressions. For example, int I = 9; if (I) // error if (I! = 0) // correct
When using a direct constant, you can add a suffix to indicate its type. The binary number does not have a direct constant representation method. You can use the static tobinarystring () method of integer long.