日期:2014-05-20 浏览次数:20745 次
public class A { private String name; private static A instance = new A(); private A(){} public A getInstance() { return instance; } public String getName() { return name; } } public class B { private static String name; private B(){} public static String getName() { return name; } } 请问: A.getInstance().getName();与B.getName();的区别.