Data type:
Integer type:
Long------2 of the 64-time Square
int-------2 of the 32-time Square
Short-----2 of the 16-time Square
BYTE------2 of 8 square
Floating point type:
Float-----up to 7 decimal digits with a total number of 8 digits
Double----number of decimal digits up to 15 bits, holding the total number of digits is 16 bits
Logic type:
Boolean---not true or false
Character type:
char------one character (position in ASCII code)
Comments
variables, constants, assignments, operators, expressions
Variable: An abstract concept that represents a value
Assignment operator =
Assign value
Variable's type variable name = variable value;
Assignment of variables:---> "="
Data type variable name assignment operator variable value
String name = "Zhao Benshan";
Numeric, Boolean type can be written directly
Characters (char type) can only be enclosed in single quotes
String: Multiple char strings together---double quotes
Binary operators: + (plus sign)-(minus sign) * (multiplication sign)/(division sign)% (remainder)
Plus and minus signs can also be used to indicate positive negative numbers
+= -= *= /=
Unary operators: + +--
Relational operators:
= = > < >= <=! =
Logical operators:
& && | | | ! ^ (XOR operation: Turn into binary (short number of bits with 0 to complement), same as 0, different 1)
Three-dimensional expression:
Boolean value 1: Value 2;
Constant:
Modifier: Final
Java Basic Data