1.

How we can make copy of a java object?

Answer»

For copying an OBJECT in Java, there are TWO WAYS- shallow COPY and deep copy.

 Shallow CopyDeep Copy
1.When you want to copy only field valuesAll the objects are deeply copied
2.Copy is dependant on ORIGINAL objectCopy is not dependent on earlier objects


Discussion

No Comment Found