public int n;
public byte b;
public Abc obj=new Abc();
}
问:
Def one=new Def(); //占多少?
答:
4+[8+4+1+4]+[8+1+4]=4+24+16=44
public class Abc {
public byte b;
public Object obj=null;
}
public class Def {
public int n;
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/