Home >Java >JavaBase >What are the eight basic data types in java

What are the eight basic data types in java

hzc
hzcOriginal
2020-07-02 15:12:274236browse

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 basic data types in java

#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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn