求教单例模式的问题...
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();的区别.