Interview Q&A / Object-Oriented Programming

INTERVIEW Q&A · 69 QUESTIONS

Object-Oriented Programming interview questions

The four pillars, interfaces, abstract classes and design basics.

  1. 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
  2. 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