题目内容

阅读下面的程序,分析代码是否能编译通过,如果能编译通过,请列出运行的结果。如果不能编译通过,请说明原因。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();}}

查看答案
更多问题

编程练习:编写Animal接口,接口中声明run()方法。定义Bird类和Fish类实现Animal接口。编写Bird类和Fish类的测试程序,并运用接口回调的思路调用其中的run()方法。请在答案中附上代码以及运行结果截图,注意,代码和截图都不要使用附件上传。

Pollution refers primarily to the of air, water, and land by wastes.

A. killing
B. fouling
C. handling
D. controlling

What environmental problems do we have nowadays?

A. sand storm
B. deforestation
C. desertification
D. soil erosion
E. global warming
F. pollution

Pesticide is harmful both to people's health and the environment.

A. 对
B. 错

答案查题题库