public class Test {
public static final String a1 = "123";
public static SingleObject a2 = new SingleObject();
public static SingleObject getSingleObject() {
return a2;
}
}
老师想确认一下.
1."123"对象是存放在堆上面的。。a1引用地址是存放在元空间上面的吗?
2.SingleObject 对象也是存放在堆上面的,a2引用地址是存放在元空间上面的吗?