摘要:
private static final HashMap hm = new HashMap(); static { for (int i = 0; i < 10; i++) { hm.put(“test“, “this is value“); } }同样的代码,在.net中就可以这么处理,假设class的名字是:Testpri... 阅读全文
摘要:
public class Test { public static int test = 0; Test() { test++; } Test(int i):this() { test += i; }//test code here:Console.WriteLine(Test.test); //第二个代码 public class Test { public stat... 阅读全文