Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Have you ever used object cloning? Do you think its beneficial?

user-image
Question ajoutée par Rehan Faiz Mohammad , Research Assistant , Texas A&M University
Date de publication: 2014/11/02
Abdul Khadeer Pasha Shaik
par Abdul Khadeer Pasha Shaik , Senior Software Engineer , Vedicsoft Solutions India Pvt Ltd

Yes , Java Object cloning has more disadvantages than advantages.

The general recommendation is to use a copy constructor instead of using clone() or Cloneable. Avoid clone at all costs and go for your own copy solution.

More Questions Like This