To specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype. Motivation: A prototype is a template of any object before the actual object is constructed. In java also, it holds the same meaning. Prototype design pattern is used in scenarios where application needs to create a number of instances of a class, which has almost same state or differs very little. In this design pattern, an instance of actual object (i.e. prototype) is created on starting, and thereafter whenever a new instance is required, this prototype is cloned to
The post What is prototype pattern? appeared first on Coding Security.
What is prototype pattern?
read more
Tidak ada komentar:
Posting Komentar