通過super我們可以訪問父類中被子類覆蓋的屬性和方法
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Implicit super constructor Father() is undefined. Must explicitly invoke another constructor
這裡報錯的原因是因為父類已經調用了有參的構造方法,子類也應該調用,並且繼承父類
同一個包裡面不能有重名的類
構造方法裡面默認是有super的
閱讀更多 滴滴滴程序員 的文章