//父类的方法
public interface Fly {
//接口中全部是抽象方法 省略Abstract
public void fly();
}
public interface Run {
public void run();
}
public class Bird implements Fly{
public void fly() {
System.out.println("12334");
}
}
public class Plane implements Fly,Run{
public void fly() {
System.out.println("用引擎飞");
}
@Override
public void run() {
System.out.println("用轮子跑");
// TODO Auto-generated method stub
}
}
public class Test {
public void main(String[] args) {
Plane plane=new Plane();
Bird bird=new Bird();
plane.fly();
plane.run();
}
}