0% found this document useful (0 votes)
11 views

Primitive Data Type in Java

The document describes the primitive data types in Java including their length, default values, and ranges. The main primitive data types are int, short, long, byte, float, double, char, and boolean with lengths ranging from 8 to 64 bits and default values of 0, 0.0, or false. Each data type has a specified range of possible values.

Uploaded by

Ashik Mahmud
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Primitive Data Type in Java

The document describes the primitive data types in Java including their length, default values, and ranges. The main primitive data types are int, short, long, byte, float, double, char, and boolean with lengths ranging from 8 to 64 bits and default values of 0, 0.0, or false. Each data type has a specified range of possible values.

Uploaded by

Ashik Mahmud
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Primitive data type in java


Data Type
int
short
long

Length
32-bit
16-bit
64-bit

Default Values
0
0
0

Range
-2147483648 to 2147483647
-32768 to 32767
-9223372036854775808 to
9223372036854775807

byte
float
double

8-bit
32-bit
64-bit

0
0.0f
0.0d

char
boolean

16-bit
True/false

\u0000
False

-128 to 127
1.4E-45 to 3.4028235E38
4.9E-324 to
1.7976931348623157E308
N/A
N/A

You might also like