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
角度来看 ...
我多认识了一点东西 … 下次有人问我这个题目时,我又多了一些东西可以嘴砲 …