Computer Science, asked by jainmanya8389, 1 year ago

What is the difference between shallow copy and deep copy in Java?

Answers

Answered by RDEEP90
1

Deep copy of an object will have exact copy of all the fields of original object just like shallow copy. But in additional, if original object has any references to other objects as fields, then copy of those objects are also created by calling clone() method on them

Similar questions