Constructors in Subclasses
上一节
下一节
}Instantiating a subclass object begins a chain of constructor calls
§The subclass constructor, before performing its own tasks, invokes its direct superclass’s constructor
}If the superclass is derived from another class, the superclass constructor invokes the constructor of the next class up the hierarchy, and so on.
}The last constructor called in the chain is always class Object’s constructor.
}Original subclass constructor’s body finishes executing last.
}Each superclass’s constructor manipulates the superclass instance variables that the subclass object inherits.

