class Person{
private String name;
public Person(){
}
public Person(String name){
this.name=name;
}
public static void main(String[] arg)
{
Person per= new Person("Andy");
}
}
per
是一个局部变量,它将被存储在堆栈上还是堆中?
per
是一个局部变量,它将被存储在堆栈上。