1.

A Class Instance Can Be Created Using New Operator. Why Should We Use Creational Design Patterns To Create Objects?

Answer»
  • Using new OPERATOR to create objects is a valid APPROACH but it's like hard CODING the object type.
  • If we are 100% sure that our object will be of the same class all the TIME, then we use new operator to create an object.
  • In scenarios where the NATURE of the object can change according to the nature of the program, we use creational design patterns which offer flexible approach for creating class instances.



Discussion

No Comment Found