OOP - Is it standard to define a class with only static methods or to define a class which only has one instance?

前端 未结 0 865
一向
一向 2021-02-06 09:36

I have a class that only requires one instance in my code. Is it better (and convention) to stick with the regular class, constructor and only create one instance of the class o

相关标签:
回答
  • 消灭零回复
提交回复
热议问题