标签:on new as return class public c private 实现
public class Singleton{ private Singleton(){ … } private static class SingletonContainer{ private static Singleton instance = new Singleton(); } public static Singleton getInstance(){ return SingletonContainer.instance; } }
标签:on new as return class public c private 实现
原文地址:http://my.oschina.net/u/946001/blog/335102