阅读下面的程序,分析代码能编译通过。 interface Animal { void breathe(); void run(); void eat(){};} class Dog implements Animal { public void breathe() { System.out.println("I’m breathing");} 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