aspose file tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes abstactfactory vs factory method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "abstactfactory vs factory method" Watch "abstactfactory vs factory method" New topic

abstactfactory vs factory method

vasu chowdary
Ranch Hand

Joined: Mar 15, 2008
Posts: 90
I just completed theory about abstract factory and factory method.could any one explain the difference between these two clearly?

Matthew Brown

Joined: Apr 06, 2010
Posts: 4518

There's an example in a previous thread that might help. The main difference is that with the factory pattern you have one class object producing instances of multiple classes. With the abstract factory pattern you have multiple (related) factories.
subject: abstactfactory vs factory method