I read in K&B6 that
instance members are accessible only after the super constructor runs.
I stumbled upon the following code:
and it prints:
My question would be:
If instance members are accessible only after the super constructor runs, then why is it that upon execution of the printIt( ) method of class Parent, (which in fact is Child's printIt( ) due to
polymorphism), it was able to access the uninitialized instance variable i of Child even though the constructor of Parent has not yet finished executing?
Confused here. What am I missing?