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 →
- Why does Java not allow a class to extend two classes?
To avoid the diamond problem: if two parents define the same method and a child inherits both, it is unclear which version should run. Java blocks it and lets you combine interfaces instead.
IntermediateQuick answer1 min read