If you’re writing a program using object-oriented programming language, then you need to create some objects.
If you are creating a complex object, you better follow some mechanisms so it could be managed and used for other purposes.
The primary principle of creational design patterns is program shouldn’t depend on how objects are created.
Creational design patterns follow one of the essential principles of OOPs which is an abstraction. They hide the internal logic of object creation.
Student student=new Student(“Rakesh”);
By using creational design patterns, this logic is hidden for the outer world. The clients can directly call some methods instead of using “new” keyword. Example: getInstance(). Here, getInstance() has the actual logic of object creation. That can be using “new” keyword or any other approach. So, here the object creation logic is hidden from the calling client.
There are six Creational Design Patterns. Suppose if a usecase falls under the perfect bucket, then you’ll pick from the best design pattern possible.