Question: What is the purpose of the 'Singleton' design pattern?Answer: The Singleton design pattern ensures that a class has only one instance and provides a global point of access to that instance.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users:
- What is the difference between a stack and a queue?
- What is the purpose of an index in a database?
- What is the purpose of the \'git\' version control system?