Skip to main content

When used Abstract Factory and Factory Method?



Factory Method used when your class depends on a subclass to decide what object to create  And Inheritance play important role.


 if your class depends n another class, which may be abstract and you are associated with it, then use abstract factory.

Comments