java 内存分析之构造方法执行过程
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
package Demo; public class BirthDate { private int day; private int month; private int year; public BirthDate(int d, int m, int y) { day = d; month = m; year = y; } }
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
package Demo; public class Demo { public static void main(String[] args) { BirthDate d1 = new BirthDate(7, 7, 1970); } }
内存分析图: