As per my understanding goes, when a subclass object is created even the superclass constructor is called but in this sequence the collection of variables for the two is different. That is to say when a superclass constructor gets called from within a subclass, a new object is created that holds the variables for the superclass.
So in the code snippet given by you, there will be two instances of variable i, and we are printing the variable i associated with the subclass whose value is not set. Hence the result 0.
Hope this helps. Please correct me if i am wrong.