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. Why use a factory instead of calling new directly?

    A factory hides which concrete class is created and how. Callers ask for what they need, and creation rules can change in one place without touching the callers.

    BeginnerQuick answer1 min read