What is a Singleton Pattern
-
The pattern that creates many instances of a single class in one shot
-
This pattern is to have only a single constructor to a class
-
Provides a class of which there can be no more than an instance, and provides a single global point of access to that instance
-
Creates and maintains a pool of objects, using which a single object can used and returned to the pool
Singleton pattern ensures a class has only one instance and provides a global access point to it. This is useful for shared resources like database connections or logging services. Option A incorrectly describes creating many instances, which contradicts Singleton's purpose. Option B is insufficient because a single constructor alone doesn't prevent multiple instances. Option D describes the Object Pool pattern, which manages reusable objects.