Prototype Pattern
Prototype Pattern will use object instance to create a new same object instance. So in this way, the two instance has some relationship like this:
Prototype Pattern will use object instance to create a new same object instance. So in this way, the two instance has some relationship like this:
Singleton Pattern is a kind of design pattern which used to keep a object unique. For every user who want to use this class to create a object, he should get the same one. Singleton pattern could be used in many scenarios: