61B-8: Inheritance, Implements
Contents
but hard to maintain!
Hypernyms, Hyponyms, and Interface Inheritance
interface
|
|
Overriding vs. Overloading
override注意加上
@Override
!!!
Interface Inheritance
基类存放指针问题 Answer: If X is a superclass of Y, then memory boxes for X may contain Y.
- An AList is-a List.
- Therefore List variables can hold ALList addresses.
Implementation Inheritance: Default Methods
|
|
Static and Dynamic Type, Dynamic Method Selection ⚠️ ⚠️ ⚠️
More Dynamic Method Selection, Overloading vs. Overriding ⚠️ ⚠️ ⚠️
紧紧盯住细节!
Interface vs. Implementation Inheritance