摘要: B类没有自己的Display方法,并且B类的子类也没有,子类不能重写Display;B类的Display方法中的代码不执行。 C类有自己的Display方法,但是C类的子类没有,子类不能重写Display 以上描述只在使用父类引用子类时有效。 A a = new B(); B b = new B() 阅读全文
posted @ 2019-02-12 14:34 snake1118 阅读(245) 评论(0) 推荐(0) 编辑