The _______ design pattern ensures that a class has only one instance and provides a global point of access to it.
- Adapter
- Factory
- Observer
- Singleton
The Singleton design pattern ensures that a class has only one instance and provides a global point of access to it. This is particularly useful when exactly one object is needed to coordinate actions across the system.
Loading...
Related Quiz
- What is a common language used for defining infrastructure as code?
- You suspect that a JavaScript function is causing errors on your web page. How would you use Browser Developer Tools to identify and fix the problem?
- Which cloud platform provides services like Virtual Machines, App Services, and Blob Storage?
- The Decorator design pattern adds _______ responsibilities to objects without altering their structure.
- What is inheritance in OOP and how does it facilitate code reuse?