SubPerson 继承自Person

父类中声明了一个方法:


在子类中

子类中有test方法的实现,调用子类自己的test方法,子类的test方法中又调用了父类的test方法[super test]
在父类中

SubPerson 继承自Person
父类中声明了一个方法:
在子类中
子类中有test方法的实现,调用子类自己的test方法,子类的test方法中又调用了父类的test方法[super test]
在父类中
本文标题:super,superClass,class的区别
本文链接:https://www.haomeiwen.com/subject/lkrdhttx.html
网友评论