Home > DeveloperSection > Interviews > What is the main difference between shallow cloning and deep cloning of objects in java?

Posted on    March-26-2014 1:52 AM

 Java Java 
 1 Answer(s)
  834  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    March-26-2014 12:00 AM

Java supports shallow cloning of objects by default when a class implements the java.lang.Cloneable interface.

Deep cloning through serialization is faster to develop and easier to maintain but carries a performance overhead.

Don't want to miss updates? Please click the below button!

Follow MindStick