Java基础班第九天(上)多态

三个内容 :多态、抽象类、接口  第一节:讲解这个多态的概念 class Demo1_Poly { public static void main(String[] args) { Animal c; c = new Cat(); c.eat(); } /* A:多态的概述 事物存在的多种形式 B:多态的前提 1:要有继承关系 2:要有方法重写 3:要有
相关文章
相关标签/搜索