我理解的你说的可能有两种意思:

  1. 继承和重写:如果要有继承概念,那person应该是父类吧,首先的实现父类person的Name。

然后子类student如果想继承,那Student不重写Name方法就好。重写了Name方法,那肯定是执行子类student的Name方法。就读不到human了。

  1. 你就想在当前代码下获取到父类的属性,那就直接把student的Name方法中输出p.Person.name就读到了human