【简答题】阅读下面的程序,修正其中的错误并说明原因interface Animal { int i; void breathe(); void run(); void eat(){};}class Dog implements Animal { void breathe() { System.out.println("I’m breathing")}public int run(){ } public void eat() { System.out.println("I’m eathing")}}public class test04 { public static void main(String [] args) { Dog dog = new Dog(); dog.breathe(); dog.eat();}}
发布时间:2024-03-31 20:01:56