Default values for java data types
- Data type either primitive or referenced having default values.
Data Type
|
Default Value (for fields)
|
byte
|
0
|
short
|
0
|
int
|
0
|
long
|
0l
|
float
|
0.0f
|
double
|
0.0d
|
char
|
‘u0000’
|
String (or any object)
|
null
|
boolean
|
false
|
Thanks for your time.
- Nireekshan