http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
Inheritance should not be confused with subtyping.[1] In some languages
inheritance and subtyping agree,[a] while in others they differ; in general
subtyping establishes an is-a relationship, while inheritance only reuses
implementation and establishes a syntactic relationship, not necessarily a
semantic relationship (inheritance does not ensure behavioral subtyping). To
distinguish these concepts, subtyping is also known as interface inheritance,
while inheritance as defined here is known as implementation inheritance.
我們到底是在討論哪種繼承?看來兩者都有!
或許該來討論一下,JLS 定義的是哪種繼承才是重點 … XD
以 JLS 著重在 public、protected 的觀點,它講的應該是 interface inheritance,
在 Java 中,inheritance 以 subtyping 來實現,著重在公開外貌,也因此,JLS 中
才會定義 private 不屬於被繼承的(外貌)。
我花了點時間重新看了整個討論,重新想了一下自己先前寫的:
https://www.ptt.cc/bbs/java/M.1405898364.A.F01.html
找了網路上更多 inheritance 的討論,我想,我講的也是從 interface inheritance
角度來看 ...
我多認識了一點東西 … 下次有人問我這個題目時,我又多了一些東西可以嘴砲 …