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;
}
}
java bean
package Demo; public class Demo {
public static void main(String[] args) {
BirthDate d1 = new BirthDate(7, 7, 1970);
}
}
测试类
内存分析图: