What is the difference between Factory
pattern and Factory method pattern.
Example: 1
A class has a method getObject(
String type).
This method returns one of the subclasses based on the type. Is this a Factory pattern or Factory method pattern.
Example 2:
A class has a method getObject(). A is an interface and b and c implement A.
This method returns objects of the subclass(b). Is this a Factory pattern or Factory method pattern.
I am not able to identify the patterns for the above examples. Please clarify.