Overload

作者: 成江 | 来源:发表于2017-12-24 11:59 被阅读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 注意区分。

    相关文章

      网友评论

          本文标题:Overload

          本文链接:https://www.haomeiwen.com/subject/syzcgxtx.html