🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Inheritance and Virtual Functions: all 10 questions

Quiz: Inheritance and Virtual Functions · Question 3 of 10

In what order do constructors run for a Derived object?

In what order do constructors run for a Derived object?

  1. A.Base first, then Derived
  2. B.Derived first, then Base
  3. C.Only Derived
  4. D.Random order
Answer & explanation

Correct answer: Base first, then Derived

The base part must exist before the derived part is built.

Can you get the rest right without peeking?

Take the timed Quiz: Inheritance and Virtual Functions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →