我有 2 个类:Date 和 Person 
Person 有 Date 类的两个属性
情况1
Date类是与 Person 类分开的类。我有这段代码正常工作:
private String name;
private Date born;
private Date died; // null indicates still alive.
public Person(String initialName, int birthMonth, int birthDay, 
      int birthYear) {
   // requirement from the instructor:
   // **implement using the this() constructor**
    this(initialName, new Date(birthMonth, birthDay, birthYear), null);
}
案例 2:内部班级(作业要求)
我把Date作为私有内部类Person
现在上面的构造函数代码不再起作用了。这是错误消息:
描述资源路径位置类型由于一些中间构造函数调用,没有可用的 Person 类型的封闭实例 Person.java /Wk03_Ch10_FileIO_Ch13_Interfaces/wk03_Ch10_FileIO_Ch13_Inner_Classes 第 43 行 Java 问题`
我该如何解决这个问题?我可以做这个:
Date dt = new Date(birthMonth, birthDay, birthYear);
不幸的是this()必须是构造函数的第一行
另一个解决方法是
public Person(String initialName, int birthMonth, int birthDay, 
      int birthYear) {
   // implement using the this() constructor
    this.name = initialName;
    this.born = new Date(birthMonth, birthDay, birthYear);
    this.died = null;
}
然而,最后一段代码不满足我this()在构造函数中使用方法的讲师要求。