java单利模式写法
摘要:
public class Something { private Something() { } private static class LazyHolder { public static final Something INSTANCE = new Something(); } public static Something getInstance() { return LazyHolder.INSTANCE; }}这样的懒汉单例模式的实现,... 阅读全文
posted @ 2012-03-15 13:22 neau火车 阅读(226) 评论(0) 推荐(0) 编辑