java多态特性

多态:用父类的引用指向子类的对象 package com.qianfeng.test;web /*svg 多态:一种事物的多种形态 狗 == 动物 == 生物 学生 == 高级动物 == 动物 == 生物this 多态的前提:类与类之间必定要有继承的关系 */ public class Demo6 {code public static void main(String[] args) {xml
相关文章
相关标签/搜索