Skip to content

重载和重写的区别 #237

Description

@zhonghuasheng
  • 重载:同名不同参(参数类型,个数,顺序至少有一个不同)
  • 重写:同名同参,子类方法不能缩小父类方法的访问权限;子类方法不能抛出比父类方法更多的异常;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions