父类引用指向子类对象
Animal c=new Cat():
成员变量:编译看左边,执行看左边
成员方法:编译看左边,执行看右边,为什么?因为有重写
多态中的转型:
向上转型:
向下转型:
父类引用转为子类对象