As we all know that constructor have to deal with the object instantiation.....
then how can a Astract class have a constuctor....
Just look into a PageNo-131 of kathy book......
first line of Topic constructor basics says......
"Every class, including abstract classes, MUST have a constructor. Burn that into your
brain. But just because a class must have one, doesn't mean the programmer has to
Please remember that the constructor is a access point where in you can define the initial state
of your newly created instance.
Since the state of the instance is also governed by what it inherits, it is necessary to invoke that parent class constructor.
Remember you can never do
But this constructor will be called when any subclass is created during the object creation.
All the parts are nicely explained further in the book. Have a go at the later part & come back if you have more queries.
Remember - the asbtract class constructor helps in creating the subclass instance & initialize the inherited part of the subclass instance
This does not mean that a abstract class instance is being created when the constructor is invoked through subclass instance