首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

JAVA中的多态表现形式,该如何处理

2012-08-13 
JAVA中的多态表现形式想问问大伙JAVA中的多态。表现形式。我看thinking in java3中的多态People are often c

JAVA中的多态表现形式
想问问大伙JAVA中的多态。表现形式。
我看thinking in java3中的多态
People are often confused by other, non-object-oriented features of Java, like method overloading, which are sometimes presented as object-oriented. Don’t be fooled: If it isn’t late binding, it isn’t polymorphism

这个是thingking in java3 中的的Summary中的一段。
但是4中好像没有。
望大牛帮忙解析下。


[解决办法]
Overload:一个类中多态表现

Java code
class Tiger() {  public void eat() {    System.out.println("I'm eating, YamiYami!");  }  public void eat(String food) {    System.out.println("I'm eating " + food + ", YamiYami!");  }} 

热点排行