Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

Describe the Prototype pattern

Experience Level: Senior
Tags: Design PatternsGang of Four (GoF)


What problem does the Prototype pattern try to solve

  • It instantiates a new object by copying all of the properties of an existing object.
  • Used usually when the construction of an object is inefficient.
  • Instead of using new keyword, Clone() is called on an existing object

Other information

  • It's a creational pattern
  • It was defined by Gang of Four (GoF)
Related Design Patterns job interview questions


No Comments Yet.
Be the first to tell us what you think.