我理解,你的问题出在对“overload”的理解上。那一段内容实际上是对“overload”的一个简单概述。原文如下:
    Only c++ programmers might be surprised by name hiding sice it works differently int that language.If a Java base class has a method name that's overloaded several times,redefining that method name in the derived class will not hide any of the base-class versions.Thus overloading works regardless of whether the method was defined at this level or in a base class:
    你现在的理解很模糊,什么叫“否则基类的方法仍然存在”?何谓“存在”?在你看完“upcast”后,应该会有一个完整的理解。

解决方案 »

  1.   

    我说的"存在"是指该基类的方法在继承类里可以直接使用,如果继承类覆盖了该方法,该方法则按继承类的定义执行。我对"overload"的理解是:继承类里的新方法,方法名与基类相同,自变量(参数)类型不同或顺序不同,如果自变量也相同则是覆盖,不是重载(overload)。请指教