The eight basic data types of Java are: 1. Integer type, byte, int, short, long; 2. Floating point type, float, double; 3. Boolean type, boolean; 4. Character type, char .
#What are the eight data types?
Eight data types: integer, floating point, Boolean, character
Integer type: byte, int, short, long
Floating point type: float , double
Boolean type: boolean
Character type: char
2. What is the difference between single precision and double precision?
Single precision numbers refer to a way for computers to express approximations of real numbers. Single precision, that is, float, is stored in 4 bytes on a 32-bit machine; while double precision double is stored in 8 bytes. This is their most essential difference
Recommended Tutorial : "java tutorial"
The above is the detailed content of What are the eight basic data types in java. For more information, please follow other related articles on the PHP Chinese website!