0
What to do for single object is required | Static and singleton
Hi All As we know, fully static class and singleton both has some pros and cons over each other. However, both violates SOLID principle. So , what should be done in case one need to have only one object at all for a class? Does singleton only option?
1 Respuesta
+ 1
Singleton class is really your only option for an object and is better then static class because of obvious reasons like inhertance