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 →
- What is the difference between instance and static members of a class?
An instance member belongs to each object and has a separate copy per object. A static member belongs to the class itself, exists once, and is shared by every object.
BeginnerQuick answer1 min read - 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