1. Integer: byte, short, Int, long
2. Float Type: float, double
3. Character Type: Char
4. boolean: Boolean
Where:
Byte occupies 8 bits, or a byte. Because it is signed, the minimum value is-128, and the maximum value is + 127.
Short occupies 16 bits, two bytes. Minimum value: 2 ^ 15, maximum value: 2 ^ 15-1.
Int placeholder 32 bits, 4 bytes. Minimum value 2 ^ 31, maximum value 2 ^ 31-1
Long occupies 64 bits, 8 bytes. The minimum value is 2 ^ 63, and the maximum value is 2 ^ 63-1.
Float placeholder 32 bits, 4 bytes. Minimum Positive and non-zero value 2 ^-149, maximum positive and non-zero value (2-2 ^-23) · 2 ^ 127.
Double Zhangwei 64 bits, 8 bytes. The minimum positive and non-zero value is 2 ^-1074, and the maximum positive and non-zero value is (2-2 ^-52) · 2 ^ 1023
Char occupies 16 bits and 2 bytes. It is mainly used to support Unicode. Therefore, char in Java is a double byte, not a byte in C ++.
There are many online Boolean statements, but according to the bytecode content, if it is a single Boolean variable, int is used for storage. If it is a Boolean array, byte is used for storage.