我已經從我們的導師和書籍中學習到polymorphism
意味着有很多shapes
,在java中它通過兩種方式實現。確實重載不在多態下?
overloading
overriding
。
在oracle docs polymorphism中定義得非常好。但我不明白爲什麼他們沒有定義重載下的多態性,他們只討論重寫?我想通過這種方式許多形狀重載也應該在多態之下。
我已經經歷了所有的問題,但我不清楚這些答案,因爲每個人都沒有提及他們的意見,每個人都有不同的看法,有人說是的,其他人都說沒有理由。
我想突出部分(從Java The Complete reference 8th ed
引用)寫入示例的overloading
。 那麼人人都說超載與ovrloading沒有任何關係,但是壓倒一切?
that how polymorphism is not achieved by overloading?
檢查http://stackoverflow.com/questions/12893907/is-polymorphism-overloading-and-overriding-are-same-concepts – sam
重載與多態性無關。 – plalx
comon @all誰標記它重複,我不滿意答案,這就是爲什麼我在這裏問它。 –