Java is an object-oriented language. Data types in Java are divided into reference types and basic data types. The basic types are divided into 8 types. Today I will explain to you int in Java and the 8 basic data types.
#Int in java is the basic data type, and int represents the definition of integer data.
Integer is a class that encapsulates int. Variables declared as int do not need to be instantiated, variables declared as Interger need to be instantiated.
The value range of int is [-2^31——2^31-1]
The data types in Java are divided into reference types and basic data types.
Basic types are divided into 8 types:
Integer type (real type): byte, short, int, long
Floating point type: float, double
Character type: char
Boolean type: boolean
Reference types include array types, classes, interfaces (multiple inheritance), and string types;
Related learning recommendations: java basic tutorial
The above is the detailed content of What does int mean in java. For more information, please follow other related articles on the PHP Chinese website!