class Student {
private String name;
private int age;
public Student(String name, int age) {
this.name = name;
this.age = age;
}
}
public class Test {
static int i = 10;
public static void main(String[] args) {
Student s1 = new Student(“feng”, 21);
}
}
当该程序运行起来后,其计算机内存分布大致如下: