There are 8 basic data types in Java, which are briefly described as follows:
1. Boolean: The data value is only true or FALSE, false by default.
2. Byte:byte type (byte type) data occupies 1 bytes in memory, representing the storage data range: -128~127.
3. Char:char type (character type) data occupies 2 bytes in memory. Char data is used to represent characters in a normal sense, with 2 bytes per character
4. Short:short type (short integer) data occupies 2 bytes in memory.
5, Int:int type (integer) data occupies 4 bytes in memory, the default is 0.
6. Long:long type (Long integer) data occupies 8 bytes in memory.
7. Float:float (single-precision floating-point type) data occupies 4 bytes in memory. (float precision is 7-8 bits)
8. Double:double (double-precision floating-point) data occupies 8 bytes in memory.
Java Basic data types