🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Singleton
  2. B.Factory
  3. C.Observer
  4. 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 →