现有: 1. interface Animal f 2. void eat(); 3. } 4. 5. // insert code here 6. 7. public class HouseCat implements Feline { 8. public void eat() { } 9. } 和以下三个接口声明: interface Feline extends Animal ( ) interface Feline extends Animal {void eat(); } interface Feline extends Animal {void eat() { } } 分别插入到第5行,有多少行可以编译?
A、 0
B、 1
C、 2
D、 3
相关问题推荐
-
下面有关struts1和struts2的区别,描述错误的是()。
A、 Struts1要求Action类继承一个抽象基类。Struts 2 Action类可以实现一个Action接口
B、 Struts1 Action对象为每一个请求产生一个实例。Struts2 Action是单例模式并且必须是线程安全的
C、 Struts1 Action 依赖于Servlet API,Struts 2 Action不依赖于容器,允许Action脱离容器单独被测试
D、 Struts1 整合了JSTL,Struts2可以使用JSTL,但是也支持OGNL
-
下面哪些类型属于引用类型()
Aint[]
BInteger
Cchar
DString
-
下面哪些控件可以产生ActionEvent()
Ajavax.swing.JButton
Bjavax.swing.JTextBox
Cjavax.swing.JList
Djavax.swing.Timer
-
计算y=1+2/3+3/5+4/7+…+n/(2*n-1)(n=50),要求:按四舍五入的方式精确到小数点后第二位。
-
以下JAVA程序的输出是什么()。
A、HelloSogou
B、SogouHello
C、Hello
D、结果不确定