Well, this is a tough one. I haven't found anything in the
Java Language Specification that directly explains this situation.
The one thing I did find was a referende to the purpose of initializer blocks:
The Java language supports instance initialization blocks, which you could use instead (of constructors). However, these are intended to be used with anonymous classes, which cannot declare constructors.
Of course the solution is to put the initialization in the constructor as SUN intended. However the answer to why the initializer of the
inner class which is a sub-class of an inner class wiht a different super class did not get invoked is still under investigation.
I played with your question this way:
And I got the following result:
I am in Eouter initializer block
I am in Eouter constructor
I am in Outer initializer block
I am in Outer constructor
I am in Inner initializer block
I am in Inner constructor
I am in Iinner constructor
z=0
x=10