Interview Question: Static class vs. Singleton pattern.

Question : Where would you choose a Singleton over a Static class?

I always expect two words to answer this question

  1. State : Static objects are not well-suited for good state management (think scalability).
  2. Weight : Don’t want too many heavy static objects floating in memory (think performance).

That would basically answer this question, but to be more fair and give a good explanation, I found a good article here [Link].

Leave a Reply