File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 4544

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.
I agree. Here's the link:
subject: abstactfactory vs factory method
It's not a secret anymore!