← Back to Test

Problem 5 - Entrance Test

Which design pattern is most appropriate for creating a single instance of a class?

Correct: B

The Singleton pattern ensures that only one instance of a class is created and provides a global point of access to it. The Factory pattern is for creating objects, the Observer pattern establishes a one-to-many dependency, and the Strategy pattern defines a family of algorithms.