My guess would have to be that i gets its default value before any of the constructors are called. So before any constructors are run the instance variables get their default values. That is why you see when new B() is called, A calls B's overriding print() method and value of 0 is printed.