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 static methods be overridden in Java?
No. A static method in a child with the same signature hides the parent's one. The call is resolved at compile time from the reference type, so there is no runtime polymorphism.
IntermediateQuick answer1 min read - What is dynamic method dispatch in Java?
It is the way Java chooses which overridden method to run at runtime, based on the actual object type and not on the type of the reference variable.
IntermediateQuick answer1 min read