interface Runner{
int ID = 1;
void run();
}
interface Animal extends Runner{
void breathe();
}
abstract class LandAnimal implements Animal{
public void breathe(){
System.out.println("LandAnimal");
}
}
public class TestInterface_01 {
public static void main(String[] args) {
LandAnimal L = new LandAnimal();
L.breathe();
}
}
抽象类怎么实现接口定义的部分方法呀?
我这个编译不能通过呢?那错了呢?
[此贴子已经被作者于2007-10-26 0:07:47编辑过]