Loading...
Java

Integral Data Type

Byte:
Size: 1 byte (8 bits)
Maxvalue: +127
Minvalue: -128
Range: -128 to 127[-27 to 27-1]

Short:
The most rarely used data type in java in short.
Size: 2 bytes
Range: -32768 to 32767 [-215  to 1215 -1]

int:
This is most commonly used data type in java.
Size: 4 bytes
Range: =-2147483648 to 2147483647 [-231 to 231-1]

long:
When int is not enough to hold big values then we use long data type
long 1=f.length(); //f is a file
Size: 8 bytes
Range: -263 to 263-1


Leave a Reply

Your email address will not be published. Required fields are marked *