# Java Data Types | # Data Types in Java
Data Types in Java | Java Data Types | Basic Data Types of Java
Data Types in Java indicates that which type of data is used in program. These Data types are classified into 2 types.
1. Primitive Types
2. Floating Type Data Types
3. Non - Primitive Type Data Types
1. Primitive Types: Primitive Data Types are simple data types. There are 8 Primitive Data Types
which are subdivided into 4 groups.
a. Integer Data Type : i) int,
ii) short,
iii) byte,
iv) long
b. Floating Point Data Types: float
double
c. Character Data Types
d. Boolean Data Types
a. Integer Data Type : It represents signed integer values. They are further divided into 4 types.
1. Byte : Byte Data Type maintains signed Integer Values of size, byte
Syn: Byte variable - name;
2. Short : Short data Type Maintains Signed Integer values of size 2 bytes.
Syn: Short variable - name;
3. Int: The int data type is most preferable integer data type. The size of int is 4 bytes
Syn : int variable - name;
4. Long: The long data type maintain a signed integer value of size 8 bytes.
Syn : Long variable - name;
2. Floating Point Data Types: Floating Point Data Types are the data types that indicates the
fractional values.
They are of 2 types
1. float: The float data type is used to represent single precision number, Its size is 4 bytes.
Syn : float variable - name;
2. Double : The Double data Type is used to represent double precision numbers. Its size is 8 byte.
3. Non - Primitive Data Types: Non - Primitive Data Types are secondary data types in Java
They are 1. array
2. structure
3. interface
No comments:
Post a Comment