Factory Method

less than 1 minute read

Factory Method is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created. Factory method is part of Creational Design Pattern.

Factory method calls for replacement of direct object construction calls ( using new operator) with calls to a special factory method. this results in objects being created through the new operator, though this is called from th eparticular factory method. Objects returned by a factory method are called products


For more information on this topic you can checkout the following amazing posts:

  1. Design Patterns
  2. Dive Into Design Patterns