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 Singleton pattern and how do you implement it?

    Singleton ensures a class has exactly one instance and gives a global access point to it. Make the constructor private, keep the instance in a static field, and return it from a static method.

    BeginnerQuick answer1 min read