摘要: 1 //饿汉式:资源利用率较低(无论是否需要都会创建),性能较高(使用前无需判断实例是否存在,可直接使用) 2 public class EagerSingleton{ 3 private static final EagerSingleton instance=new EagerSingleton(); 4 private EagerSingleton(){} 5 pu... 阅读全文
posted @ 2017-05-31 10:22 xiongjiawei 阅读(160) 评论(0) 推荐(0) 编辑