http://javapapers.com/design-patterns/factory-method-pattern/
Assume that you have a set of classes which extends a common super class or interface. Now you will create a concrete class with a method which accepts one or more arguments. This method is our factory method. What it does is, based on the arguments passed factory method does logical operations and decides on which sub class to instantiate.
Application
public
class
PetFactory {
public
Pet getPet(String petType) {
Read full article from Design Patterns Uncovered: The Factory Method Pattern | Javalobby