black

Java认证考试综合练习

登录

单项选择题

现有:  
1. interface Animal {   
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

相关考题

单项选择题 现有:   class TestMain {      static int x = 2;  static { x = 4; }   static public void main(String[] args) {    int y = x + 1;   System.out.println(y);    }    }    和命令行:  java TestMain    结果为:()

多项选择题 public class TestDemo{   private int x = 2;  static int y = 3;  public void method(){     final int i=100;     int j = 10;      class Cinner{  public void mymethod(){  //Here       }    } } }  在Here处可以访问的变量是哪些?()

多项选择题 下列哪些访问修饰符是在子类中可见的?()

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064