View Full Version : Quick Constructor Question

06-07-2007, 04:37 PM
Hi all, just a quickie:

If I have class B extending class A, and both classes contain different constructors, does the creation of an object of class B cause initialisation with B's constructor only, or A's then B's?

In other words, if I want B to be initialised with properties of A, is it enough to simply extend, or do I need a call to the parent's constructor as well?

06-07-2007, 04:45 PM
This may be of some help:

06-07-2007, 05:15 PM
So yes, needs a call to the parent constructor.

Thanks :thumbsup: