Home > Java > JavaBase > body text

What are the eight basic data types in java

hzc
Release: 2020-07-02 15:12:27
Original
4179 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!