Originally posted by Deepak Jain:
Here is the order.
1) Static blocks of Parent class executes in the order of declaration.
2) STatic blocks of Child class executes in the order of declaration.
Once the child class is instantiated
1) First all the instance variables are initialized with default values in the order they are present in the code.
2) Instance block of Parent class executes in the order of declaration.
3) Constructos in Parent class are invoked and run and if it inhertis others then same order is repeated.
4) Super class constructors are invoked.
6) Once super class constructors finish execution. Instance blocks of child class are exected in the order of declaration.
7) If Instance variables are initialized explicit values then they are executed.
8) Class constructor runs