posted 18 years ago
"Instance variables are defined inside the class, but outside of any method, and are only initialized when the class is instantiated."
In every constructor the first line execution will be calling the default constructor of the base class (super()) or calling another overloaded constructor (this())
so in this when the Class Z initialted , the instance variable 'y' got initiated So now the Y's constructor will called. and then the Z's constructor called , before the execution it calls the x's (base class) constructor like
thats why you got the YXYZ ... hope it will help you