Wednesday, April 25, 2012

When a subclass is instantiated, is only one object created?

Since many constructors also call the superclass constructor, it seems like one could think that both the subclass and the superclass are instantiated when a subclass is instantiated; i.e. more than one object is created.



Is still just one object created?



Thank you





No comments:

Post a Comment