Stephan van Hulst wrote:1. Memory for the entire object is allocated
2. All fields (including fields of superclasses) are set to default values: booleans are false, ints are 0, references are null, etc.
3. For each superclass of the object, starting with Object and working down:
a. fields are initialized if they have explicit initializers (e.g. private int = 3);
b. initializer blocks are executed;
c. constructor is executed;
Let's say we have a Tiger, which is an Animal, which is an Object:
First we allocate memory for the entire object, including all the fields of Tiger, Animal and Object. Then all these fields are set to 'zero'.
Now, all the fields of Object are initialized with their given values. Then the initializer blocks of Object are executed. Then the remaining statements in Object's constructor are run.
Then the same thing happens for Animal, first its fields are set explicitly, then the initializers are run, and finally the constructor is completed.
Last but not least, the exact procedure happens for Tiger.