Have a look at this code.........
public class Test35 {
int k;
{
k = 4;
System.out.println("In Initializer block");
System.out.println("this.k = " + this.k);
}
Test35() {
System.out.println("In constructor");
}
public static void main(
String[] args) {
new Test35();
}
}
Output is:
In Initializer block
this.k = 4
In constructor
Object of type Test35 is Instantiated during constructor call.
So I thought Initializer block is called after constructor call but the output is other way, WHY???
Or is object Instantiated before Initializer block is called???