Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to correctly override clone method in Java

 
Javin Paul
Ranch Hand
Posts: 295
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic