摘要:
public class Test{ //中间变量 private String res = "0"; //方法 public int func(int i){ if(i>0){ int temp = i%10; res = res+String.valueOf(temp); func(i/10); 阅读全文
摘要:
//懒汉式(线程不安全) class LazySingleton{ private static LazySingleton singleton; private LazySingleton(){} public static LazySingleton getInstance(){ if(sing 阅读全文