PDA

View Full Version : Why default constructor of base class will be called first in java?


rajesh
30-12-2009, 09:27 PM
A subclass inherits all the methods and fields (eligible one) from the base class, so base class is constructed in the process of creation of subclass object (subclass is also an object of superclass). Hence before initializing the default value of sub class the super class should be initialized using the default constructor.