单选题现有:  1. interface Animal {  2. void eat();  3. }  4.  5. // insert code here  6.  7. public class HouseCat extends Feline {  8. public void eat() { }  9. }   和五个声明:  abstract class Feline implements Animal { }  abstract class Feline implements Animal { void eat(); }  abstract class Feline implements Animal { public void eat(); }  abstract class Feline implements Animal { public void eat() { } }  abstract class Feline implements Animal { abstract public void eat(); }  分别插入到第5行,有几个可以通过编译?()A0B1C2D3

单选题
现有:  1. interface Animal {  2. void eat();  3. }  4.  5. // insert code here  6.  7. public class HouseCat extends Feline {  8. public void eat() { }  9. }   和五个声明:  abstract class Feline implements Animal { }  abstract class Feline implements Animal { void eat(); }  abstract class Feline implements Animal { public void eat(); }  abstract class Feline implements Animal { public void eat() { } }  abstract class Feline implements Animal { abstract public void eat(); }  分别插入到第5行,有几个可以通过编译?()
A

0

B

1

C

2

D

3


参考解析

解析: 暂无解析

相关考题:

受压容器安全附件是:1.();2.();3.();4.();5.();6.();7.()

烟叶成熟的特征从哪几方面判断:1.()、2.()、3.()、4.()、5.()、6.()

1. public class Target {  2. private int i = 0;  3. public int addOne() {  4. return ++i;  5. }  6. }  And:  1. public class Client {  2. public static void main(String[] args) {  3. System.out.println(new Target().addOne());  4. }  5. }  Which change can you make to Target without affecting Client?() A、 Line 4 of class Target can be changed to return i++;B、 Line 2 of class Target can be changed to private int i = 1;C、 Line 3 of class Target can be changed to private int addOne() {D、 Line 2 of class Target can be changed to private Integer i = 0;

1. public interface A {  2. public void doSomething(String thing);  3. }  1. public class AImpl implements A {  2. public void doSomething(String msg) { }  3. }  1. public class B {  2. public A doit() {  3. // more code here  4. }  5.  6. public String execute() { 7. // more code here  8. }  9. }  1. public class C extends B {  2. public AImpl doit() {  3. // more code here  4. }  5.  6. public Object execute() {  7. // more code here  8. }  9. }  Which statement is true about the classes and interfaces in the exhibit?() A、 Compilation will succeed for all classes and interfaces.B、 Compilation of class C will fail because of an error in line 2.C、 Compilation of class C will fail because of an error in line 6.D、 Compilation of class AImpl will fail because of an error in line 2.

现有:  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、  0B、  1C、  2D、  3

1. public class Test {   2. public static void main (String args) {   3. unsigned byte b = 0;   4. b--;   5.   6. }   7. }   What is the value of b at line 5?()  A、 -1B、 255C、 127D、 Compilation will fail.E、 Compilation will succeed but the program will throw an exception at line 4.

1. public class A {  2. void A() {  3. System.out.println(“Class A”);  4. }  5. public static void main(String[] args) {  6. new A();  7. }  8. }  What is the result?()  A、 Class AB、 Compilation fails.C、 An exception is thrown at line 2.D、 An exception is thrown at line 6.E、 The code executes with no output.

常见的网上购物流程是()。A、1.查找商品2.提交订单3.放入购物车4.查看订单状态5.收货确认B、1.查找商品2.提交订单3.查看订单状态4.放入购物车5.收货确认C、1.查找商品2.放入购物车3.提交订单4.查看订单状态5.收货确认D、1.查找商品2.放入购物车3.提交订单4.收货确认5.查看订单状态

分析下列汉字音节结构。 1.摆 2.皇 3.卫 4.惘 5.情

观赏植物根据观赏部位分类可分为1.()2.()3.()4.()5.().

露地观赏植物可分1.()2.()3.()4.()5.().

1. interface TestA { String toString(); }  2. public class Test {  3. public static void main(String[] args) {  4. System.out.println(new TestA() {  5. public String toString() { return “test”; }  6. }  7. }  8. }  What is the result?() A、 testB、 nullC、 An exception is thrown at runtime.D、 Compilation fails because of an error in line 1.E、 Compilation fails because of an error in line 4.F、 Compilation fails because of an error in line 5.

填空题汽车冷气机之主件可分:1.()2.()3.()4.()和干燥器5.()开关。

单选题1. interface I { void go(); }   2.   3. abstract class A implements I { }  4.   5. class C extends A {   6. void go(){ }   7. }   结果是什么?()A代码通过编译B由于多个错误导致编译失败C由于第1行的错误导致编译失败D由于第6行的错误导致编译失败

多选题现有2 个文件:  1. package x;  2. public class X {  3. public static void doX() { System.out.print("doX "); }  4. }  和:  1. class Find {  2. public static void main(String [] args) {  3. //insert code here  4. }  5. }  哪两行分别插入到类Find 的第3 行将编译并产生输出“doX”? ()AdoX();BX.doX();Cx.X.doX();Dx.X myX = new x.X(); myX.doX();

单选题Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. public static void process(byte[]) { /* more code here */ }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4. byte[] bytes = new byte[256];  5. // insert code here  6. }  7. }  What is required at line 5 in class SomeApp to use the process method of BitUtils?()A process(bytes);B BitUtils.process(bytes);C util.BitUtils.process(bytes);D SomeApp cannot use methods in BitUtils.E import util.BitUtils.*; process(bytes);

单选题1. public class Test {  2. public static void main (String []args)  {  3. unsigned byte b = 0;  4. b--;  5.     6.   }  7. }   What is the value of b at line 5?()A -1B 255C 127D Compilation will fail.E Compilation will succeed but the program will throw an exception at line 4.

单选题1. public class SimpleCalc {  2. public int value;  3. public void calculate() { value += 7; }  4. } And:  1. public class MultiCalc extends SimpleCalc {  2. public void calculate() { value -= 3; }  3. public void calculate(int multiplier) {  4. calculate();  5. super.calculate();  6. value *=multiplier;  7. }  8. public static void main(String[] args) {  9. MultiCalc calculator = new MultiCalc();  10. calculator.calculate(2);  11. System.out.println(”Value is: “+ calculator.value);  12. }  13. }  What is the result?()A Value is: 8B Compilation fails.C Value is: 12D Value is: -12E The code runs with no output.F An exception is thrown at runtime.

单选题现有:  1. interface Animal {  2. void eat();  3. }  4.  5. // insert code here  6.  7. public class HouseCat extends Feline {  8. public void eat() { }  9. }   和五个声明:  abstract class Feline implements Animal { }  abstract class Feline implements Animal { void eat(); }  abstract class Feline implements Animal { public void eat(); }  abstract class Feline implements Animal { public void eat() { } }  abstract class Feline implements Animal { abstract public void eat(); }  分别插入到第5行,有几个可以通过编译?()A0B1C2D3

多选题1. public class A {  2. public void method1() {  3. B b=new B();  4. b.method2();  5. // more code here  6. }  7. }  1. public class B {  2. public void method2() {  3.C c=new C();  4. c.method3();  5. // more code here  6. }  7. }  1. public class C {  2. public void method3() {  3. // more code here  4. }  5. }  Given:  25. try {  26. A a=new A();  27. a.method1();  28. } catch (Exception e) {  29. System.out.print(”an error occurred”);  30. }  Which two are true if a NullPointerException is thrown on line 3 of class C?()AThe application will crash.BThe code on line 29 will be executed.CThe code on line 5 of class A will execute.DThe code on line 5 of class B will execute.EThe exception will be propagated back to line 27.

单选题1. public class A {  2. void A() {  3. System.out.println(“Class A”);  4. }  5. public static void main(String[] args) {  6. new A();  7. }  8. }  What is the result?()A Class AB Compilation fails.C An exception is thrown at line 2.D An exception is thrown at line 6.E The code executes with no output.

单选题现有:  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  0B  1C  2D  3

单选题现有:  interface Animal {       void eat () ;       }       //insert code here       public class HouseCat extends Feline {       public void eat() { }       }  和五个申明  abstract class Feline implements Animal { }  abstract  class  Feline  implements  Animal  {  void eat () ;  }  abstract class Feline implements Animal { public void eat();}  abstract class Feline implements Animal { public void eat() {}  }  abstract class Feline implements Animal { abstract public void eat();} 结果为:()A1B2C3D4

单选题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 行,有多少行可以编译?()A0B1C2D3

单选题1. class Animal { Animal getOne() { return new Animal(); } }  2. class Dog extends Animal {  3. // insert code here   4. }  5.  6. class AnimalTest {  7. public static void main(String [] args) {  8. Animal [] animal = { new Animal(), new Dog() } ;  9. for( Animal a : animal) {  10. Animal x = a.getOne();  11. }  12. }  13. }  和代码:  3a. Dog getOne() {  return new Dog();  }  3b. Animal getOne() {  return new Dog();  }  第 3 行中插入的哪项将编译且运行无异常?()A3a行B3b行C3a行或3b行D既非3a,也非3b

填空题观赏植物根据观赏部位分类可分为1.()2.()3.()4.()5.().

填空题物候观测应做到:1.定点;2.();3.定时、定年限;4.();5.资料整理。

填空题露地观赏植物可分1.()2.()3.()4.()5.().