posted 3 years ago
Clone() method is one of those details of Java, which is most criticized but same time most overlooked as well. If you have to use clone() method or have to work on a project which is already using clone() than it become even more important to understand every subtle details of clone() method in Java. I have recently shared my experience on How to correctly override clone method in Java, which includes some basics of How cloning works, some bits on deep cloning and shallow cloning and some best practices while overriding clone method in Java. Let me know how do you find it.