赞
踩
1.A
2.C
3.B
4.C
5.A
//接口 public interface IFly { public abstract void fly(); } //飞机类 class Plane implements IFly { @Override public void fly() { System.out.println("飞机在天上飞"); } } //小鸟类 class Brid implements IFly { @Override public void fly() { System.out.println("小鸟在天空翱翔"); } } //气球类 class Balloon implements IFly { @Override public void fly() { System.out.println("气球飞上天空"); } }
//测试类
class Test {
public static void main(String[] args) {
IFly plane = new Plane();
IFly brid = new Brid();
IFly balloon = new Balloon();
plane.fly();
brid.fly();
balloon.fly();
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。