摘要: 单例模式的使用场景: 懒汉式:有锁才安全,但是效率低 public class Singleton { private static Singleton instance; private Singleton (){} //线程不安全,用public static synchronized Sing 阅读全文
posted @ 2018-07-10 11:52 _杨 阅读(91) 评论(0) 推荐(0)