vendredi 27 février 2015

Is clone method an example of Prototype pattern in Java?


  • If someone asks me what is the example of prototype pattern in Java which is already implemented in Java APIs , can I say clone() method ?

  • I feel clone() method in itself doesn't exemplify prototype pattern , it's just a means to achieve prototype pattern. Am I right ?

  • Though some answers on stackoverflow says that clone() method is an example of Prototype pattern in Java e.g. Examples of GoF Design Patterns Are they right ?


Aucun commentaire:

Enregistrer un commentaire