Card 10/ 10

RecapDifficulty: Advanced1 min

Recap: Inheritance

What extends gives, constructor order, overriding, super and private, with where each was.

Inheritance comes down to the five ideas below, each listed with the card that covers it.

What the topic established, and which card it was on
The ideaWhere
A subclass gets the parent's members but not its constructorsJava Inheritance: What extends Gives a Subclass
Constructors are entered downwards and complete upwards, most general firstConstructor Chaining: Parent Constructors Finish First
Same name and same parameter list is overriding; a different list is overloadingOverriding vs Overloading
super(...) is inserted for you, and super.method() reaches one level upThe super Keyword: Parent Methods and Parent Constructors
A private parent field exists in the object and cannot be named by the subclassWhy a Subclass Cannot Name a private Parent Field

extends decides what an object contains, and access modifiers decide what your source may name. Those are two different questions, and almost every confusing inheritance error is one of them mistaken for the other.