Class (Initialization|Instantiation) in java.
During an class initialization:
The first initialization is to give to class fields their default values.
Field Datatype | Default Initialization |
---|---|
boolean | false |
byte | 0 |
char | |
double | 0.0 |
float | 0.0 |
integer | 0 |
long | 0 |
short | 0 |
string | null |
They can be then initialize with more logics through an static initialization block.