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

What are the eight basic data types in java

王林
王林Original
2020-06-16 14:35:383150browse

What are the eight basic data types in java

The eight basic data types in Java are: int, short, float, double, long, boolean, byte, and char.

Their encapsulation classes are: Integer, Short, Float, Double, Long, Boolean, Byte, Character.

(Video tutorial recommendation: java video tutorial)

Let’s take a look at the picture below:

What are the eight basic data types in java

The values ​​in Java are all signed. There are no unsigned numbers. Their value range is also fixed and will not change with changes in the hardware environment or operating system.

Primitive data types are passed by value when passing parameters, and encapsulated classes are passed by reference.

Recommended tutorial: java entry program

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