向上转型 向下转型

有两个类 father,son,son继承father 

father f = new son();//向上转型  f 指向子类

son s = (son)f;//向下转型 s 指向子类

原文地址:https://www.cnblogs.com/team42/p/6964579.html