Skip to content

Commit 6bab9ed

Browse files
committed
Added real world example for Factory Method.
1 parent f22d4a3 commit 6bab9ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
* a class wants its subclasses to specify the objects it creates
7575
* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate
7676

77+
**Real world examples:**
78+
* [java.util.Calendar#getInstance()](http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html#getInstance%28%29)
79+
7780
## <a name="prototype">Prototype</a> [&#8593;](#list-of-design-patterns)
7881
**Intent:** Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
7982

0 commit comments

Comments
 (0)