Search code examples
javaoopdesign-patternscloneprototype-pattern

Difference between Prototype Design Pattern and simple Java clone


I just learned that Prototype Design Pattern minimizes instance creation process. Ultimately, it calls .clone() method to create duplicate instance of the object.

So what is the difference between calling a normal clone method than going for Prototype Design Pattern?


Solution

  • Same as the difference between singleton design pattern and enum,

    One is a pattern and one is a possible implementation in java