Overload
2017-12-24 本文已影响11人
成江
Overloading 函数重载
在同一个类中,允许存在一个以上的同名函数,只要他们的参数个数或者参数类型不同即可。与返回值无关,只看参数列表
Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java, that allows a class to have more than one constructor having different argument lists.
与 Override 注意区分。