JavaseLearn19-JVM内存图
执行以下程序时JVM的内存图
/**
* @Author: TSCCG
* @Date: 2021/07/02 17:26
*/
public class JvmDemo01 {
public static void main(String[] args) {
Person person1 = new Person();
Person person2 = new Person();
System.out.println(person1.name + " " + person1.age);
person2.name = "张三";
person2.age = 20;
System.out.println(person2.name + " " + person2.age);
int num = 10;
}
}
class Person {
String name;
int age;
}