• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to correctly override clone method in Java

 
Ranch Hand
Posts: 300
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic