Monday, 16 November 2015

Explain about datatypes in Java


 
S.No
Data Type
Default Value
Default Size
1
boolean
false
1 bit
2
char
'\u0000'
2 bytes = 16 bits
3
byte
0
1 byte = 8 bits
4
short
0
2 bytes = 16 bits
5
int
0
4 bytes = 32 bits
6
long
0L
8 bytes = 64 bits
7
float
0.0f
4 bytes = 32 bits
8
double
0.0d
8 bytes = 64 bits

 

No comments:

Post a Comment