java 单例模式
参考:http://blog.csdn.net/kufeiyun/article/details/6166673
private static Single instance = null public synchronized static Single getInstance(){ if(instance==null){ instance = new Single(); } }
private static Single instance = new Single(); public static Single getInstance(){ return instance; }