标签:ica 对象 pre lazy 技术 oid cat inf 对象内存
1、
public class Application {
public static void main(String[] args) {
Pet dog = new Pet();
dog.name = "旺财";
dog.age = 3;
dog.shout();
System.out.println(dog.name);
System.out.println(dog.age);
Pet cat = new Pet();
}
}
public class Pet {
public String name;
public int age;
//无参构造
public void shout(){
System.out.println("叫了一声");
}
}
标签:ica 对象 pre lazy 技术 oid cat inf 对象内存
原文地址:https://www.cnblogs.com/helloxiaolu/p/13282140.html