user image

Preeti Tripathi

Job Interview Skills
English
2 years ago

50. What distinguishes deep copy from shallow copy?

user image

Abhishek Mishra

2 years ago

When a new instance type is formed, a shallow copy is employed, keeping the copied values in the new instance. A shallow copy is utilized to copy reference points in a manner akin to how it replicates values. Because these references point to the original objects, any changes made to a class member will also affect the original copy of the class.

Recent Doubts

Close [x]