when a decision must be made at the time a class is instantiated. Typically, the details of the
classes that are instantiated, what exactly are they, how, and when object need to be created, Objects are
encapsulated by an abstract superclass and hidden from the client class, which knows only
about the abstract class or the interface it implements. The specific type of the concrete class
is normally unknown to client class.
The Singleton pattern is one of the Creational Pattern, for example, is used to encapsulate the creation of an object in order to maintain control over it by making a single instance for application. This not only ensures that only one is created, but also allows lazy instantiation; that is, the instantiation of the object can be delayed until it is actually needed. This is especially beneficial if the constructor needs to perform a costly operation, such as accessing a remote database.