What are factory classes?

Prasad Thammineni

Factory classes provide an interface for creating families of related objects. Factory classes are useful when the decision of which class to use must be done at run time and cannot be hard coded during development. Factory classes encapsulate the logic needed to decide which subclass to instantiate and so removes this decision from the application, delegating it to the factory.
For more information refer to the article "Java Portability by Design" at http://www.ddj.com/articles/1999/9906/9906c/9906c.htm
. Also, refer to THE patterns book - Design Patterns, Elements of Reusable Object-Oriented Software - http://cseng.aw.com/bookdetail.qry?ISBN=0-201-63361-2&ptype=1130