Interview Q&A / Object-Oriented Programming
Object-Oriented Programming interview questions
The four pillars, interfaces, abstract classes and design basics.
Prefer rapid revision? Practise Object-Oriented Programming short interview answers →
- Can an abstract class have a constructor? Why would it need one?
Yes. It cannot be instantiated directly, but a subclass constructor calls it with super() so the parent's fields get initialised.
IntermediateQuick answer1 min read