Java - (Class|Object|Member) (Initialization|Instantiation)


Class Initialization

During an class initialization:

The first initialization is to give to class fields their default values.

Field Datatype Default Initialization
boolean false
byte 0
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.


Documentation / Reference

Powered by ComboStrap