Home » java » Java Integer Data Type

Java Integer Data Type

There are four integer data types (byte, short, int and long) in java that can hold integer values.

All four data types with default value size and minimum and maximum value range that can store  are shown below

TypeDefaultSizeMin Max Value
byte08 bits-27, 27 -1
short016 bits-215, 215 -1
int032 bits-231, 231 -1
long064 bits-263, 263 -1

Lets see a simple program to initialize and print integer data types.


Managed by MochaHost - Fast & Easy WordPress Hosting