先祖先,再客人,最后自己
class Person{
public Person(){
System.out.println("Person");
}
}
class School{
public School(){
System.out.println("School");
}
}
class Student extends Person{
School school = new School();
public Student(){
System.out.println("Student");
}
}
Student student = new Student();
//执行顺序为Person>School>Student
Person
School
Student