The prototype pattern is used in cases where the cost of creating a new object is much more than simply editing the attributes of an already existing object. So this pattern should be used when one has the privileges to modify the desired attributes of the object.
In java, the prototype of an object can be got by using the clone method. The method returns a new copy of the object if the class implements a marker interface named cloneable.
In java, the prototype of an object can be got by using the clone method. The method returns a new copy of the object if the class implements a marker interface named cloneable.
0 Comments On This Entry
← January 2022 →
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |
My Blog Links
Recent Entries
-
SCJP Notes - Part 8on Apr 04 2008 01:22 AM
-
SCJP Notes - Part 7on Mar 31 2008 05:06 AM
-
SCJP Notes - Part 6on Mar 27 2008 08:19 AM
-
SCJP Notes - Part 5on Mar 27 2008 08:05 AM
-
SCJP Notes - Part 4on Mar 27 2008 07:31 AM
Recent Comments
Search My Blog
11 user(s) viewing
11 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)



Leave Comment








|