overwrite:java中就没有它的存在, java官方文档没有该词的出现, 但是国外有人把overwrite解释为override。
Java 笔记
时间:2014-05-11 16:10:25
收藏:0
阅读:200
@1:
overriding(覆盖): 子类overriding父类中的函数(方法)。
overloading(重载): 同一个类中包含多个同名的函数(方法), 但各个函数的参数列表不同。
overriding和overloading是Java多态性的不同表现: overriding是父类与子类之间多态性的表现; overloading是同一个类中多态性的表现。
Overriding, which is what I think you
mean by "overwriting" is the act of providing a different implementation of a
method inherited
from a base type, and is basically the
point of polymorphism by inheritance.
参考:
java override
overwrite与overload: http://bijian1013.iteye.com/blog/1924157
评论(0)