The _______ pattern allows a new object to be created by cloning an existing object to avoid the overhead of creating an object from scratch.

  • Singleton
  • Prototype
  • Decorator
  • Observer
The Prototype pattern allows a new object to be created by cloning an existing object, avoiding the overhead of creating an object from scratch. It involves creating an object as a prototype and then creating new instances by copying that prototype.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *