在一个安卓应用中,我们可以使用多少个单例类?

huangapple go评论60阅读模式
英文:

How many singleton classes can we use in one android app?

问题

我想知道在安卓应用中是否可以使用多个单例类。这是否可能?所得到的所有答案都是关于单例类的实例,但那不是我的问题。

英文:

I want to know if I can use multiple singleton classes in an android app. Is it possible?
All of the answers I'm getting are about singleton class instance but that is not my question.

答案1

得分: 2

你可以使用任意数量的单例模式。
单例模式只是一种设计模式:
https://zh.wikipedia.org/wiki/单例模式

英文:

You can use as many singeltons as you like.
Singleton is just a pattern:
https://en.wikipedia.org/wiki/Singleton_pattern

huangapple
  • 本文由 发表于 2020年10月23日 17:43:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/64497657.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定