android中的单例模式

这是本博看了《android源码设计模式解析与实战》的总结。 单例模式的实现方式 1.懒汉模式 public class Singleton{ private static Singleton sInstance; private Singleton(){ } public static synchronized Singleton getInstance(){ if(sInstance
相关文章
相关标签/搜索