← Quiz: Design Patterns: all 10 questions
Quiz: Design Patterns · Question 1 of 10
Which pattern ensures a class has only one instance?
Which pattern ensures a class has only one instance?
- A.Singleton
- B.Factory
- C.Observer
- D.Strategy
Answer & explanation
Correct answer: Singleton
Singleton uses a private constructor and a static access method.
Can you get the rest right without peeking?
Take the timed Quiz: Design Patterns quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →