What Is The Difference Between A Shallow Copy And A Deep Copy?

What Is The Difference Between A Shallow Copy And A Deep Copy?What Is The Difference Between A Shallow Copy And A Deep Copy?

Scholar Asked on April 21, 2018 in COMPUTER ENGINEERING.
Add Comment
1 Answer(s)

A shallow copy simply creates a new object and inserts in it references to the members of the original object. A deep copy constructs a new object and then creates in it copies of each of the members of the original object.

Scholar Answered on April 23, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.