This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Because other members of the superclass are inherited. For example, any non-private data members are inherited and those members may be initialized in the constructors of the parent class. If the parent class constructor wasn't executed, those members would now be uninitialized, which is definitely not what we want.
Constructors are not inherited but... if the super constructors are automatically invoked by the system, everytime a new instance of a class is created, it's like saying the super constructors are "inherited" by the constructor.
Result: Invoked super constructor A Invoked super constructor B Invoked super constructor C Test
So, the way I view it, the super constructors of the constructor are "inherited" by the constructor because they are automatically invoked by the system everytime an instance is created. Please correct me on this. Thanks!
Joined: Mar 05, 2003
Does class B "inherit" constructor A()? Does class B "inherit" constructor A(int)? A() is automatically invoked, A(int) is not. B has access to both constructors. [ November 21, 2003: Message edited by: Marlene Miller ]