🎙 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 8 of 10

Which is a real drawback of the Singleton pattern?

Which is a real drawback of the Singleton pattern?

  1. A.It acts like global state, which makes unit testing and tracking dependencies harder
  2. B.It always uses more memory than other patterns
  3. C.It cannot be written in Python
  4. D.It allows many instances
Answer & explanation

Correct answer: It acts like global state, which makes unit testing and tracking dependencies harder

State changed in one test can leak into the next.

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 →