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

> Procedural Languages > Java

1 - About

Advertising

3 - 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
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.

Advertising

4 - Methods

5 - Documentation / Reference

lang/java/initialization.txt · Last modified: 2017/09/17 17:27 by gerardnico