Hi Ashik,
You're fairly close
When a class is loaded, memory is allocated for the static fields and they are assigned their default values; except for 'finals' declared with a literal, these are never set to their default value.
Static fields and initializers are executed (according to the order they appear in the source code).
Once the class is properly loaded, an instance may be created. Memory is assigned for all the instance variables and they are set to their default values; except for 'finals' declared with a literal, these are assigned the literal and are never set to their default values.
The parameters for the ctor are evaluated.
Instance variables and initializers are executed, according to the order they appear in the code.
The remainder of the ctor is executed.
The process is recursive in that all the superclasses have to be created first.
The whole process is to ensure that every object will be in a 'consistent' state. For example, if class B extends class A which extends Object than the fields and methods class B inherits from class A and Object, as well as it's own fields and methods should all be available and accessible in any class B object once it is created.
See JLS §:12.4 & 12.5.
Hope that helps.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform