![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java 多态
hfy779012303
这个作者很懒,什么都没留下…
展开
-
Java 多态
[code="java"] package test; class Human{ public void show(){ System.out.println("human"); } } class Man extends Human{ public void show(){ System.out.println("man"); } } ...2015-04-19 13:03:00 · 103 阅读 · 0 评论 -
Java 多态
public class Hello { public static void print(Human h){ h.show(); System.out.println("p human"); } public static void print(Man h){ h.show(); System.out.println("p man"); } public static void main(String[]2015-04-19 13:03:00 · 92 阅读 · 0 评论