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 a shallow copy and a deep copy of an object?

    A shallow copy duplicates the object but shares the objects it refers to. A deep copy duplicates the whole graph, so the copy shares nothing with the original.

    IntermediateQuick answer1 min read