🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: OOP Interview Questions: all 10 questions

Quiz: OOP Interview Questions · Question 10 of 10

When does an abstract class's constructor run?

When does an abstract class's constructor run?

  1. A.Never, because abstract classes cannot be created
  2. B.Only when called with new on the abstract class
  3. C.Only through reflection
  4. D.When an object of a subclass is created, as part of the constructor chain
Answer & explanation

Correct answer: When an object of a subclass is created, as part of the constructor chain

The subclass constructor calls super(), which runs the abstract parent's constructor.

Can you get the rest right without peeking?

Take the timed Quiz: OOP Interview Questions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →