1.

What is the main advantage of using a prototype design pattern over object creation using a new keyword?

Answer»

Prototype design PATTERN is used for creating duplicate objects BASED on the prototype of the ALREADY existing object using cloning. Doing this has a positive impact on the performance of object creation. Creating objects using the new KEYWORD requires a lot of resources and is a heavyweight process that impacts performance. HENCE, the prototype design pattern is more advantageous than the object created using a new keyword.



Discussion

No Comment Found