单项选择题X 纠错

A. An exception is thrown.
B. The code will not compile.
C. The program prints “null”
D. The program prints “blue”
E. The program prints “green”

参考答案:
查答案就用赞题库小程序 还有拍照搜题 语音搜题 快来试试吧
无需下载 立即使用

你可能喜欢

单项选择题

A. An exception is thrown.
B. The program exists without printing anything.
C. An error at line 1 causes compilation to fail.
D. An error at line 6 causes the compilation to fail.
E. “Running” is printed and the program exits.

多项选择题

A. Exiting from a synchronized block.
B. Calling the wait method on an object.
C. Calling the notify method on an object.
D. Calling the notifyAll method on an object.
E. Calling the setPriority method on a thread object.

单项选择题

A. The program runs and prints “i=1, j=0”
B. The program runs and prints “i=1, j=4”
C. The program runs and prints “i=3, j=4”
D. The program runs and prints “i=3, j=0”
E. An error at line 4 causes compilation to fail.
F. An error at line 7 causes compilation to fail.

单项选择题

A. Compilation will fail.
B. Compilation will succeed and the program will print “3”
C. Compilation will succeed but the program will throw a ClassCastException at line 6.
D. Compilation will succeed but the program will throw a ClassCastException at line 7.

多项选择题

A. Final void methoda() {}
B. Void final methoda() {}
C. Static void methoda() {}
D. Static final void methoda() {}
E. Final abstract void methoda() {}

多项选择题

A. static class InnerOne {  public double methoda() {return d1;}  }
B. static class InnerOne {  static double methoda() {return d1;} }
C. private class InnerOne {  public double methoda() {return d1;} }
D. protected class InnerOne {  static double methoda() {return d1;} }
E. public abstract class InnerOne {  public abstract double methoda();  }

多项选择题

A. The default constructor initializes method variables.
B. The default constructor invokes the no-parameter constructor of the superclass.
C. The default constructor initializes the instance variables declared in the class.
D. If a class lacks a no-parameter constructor,, but has other constructors, the compiler creates a default constructor.
E. The compiler creates a default constructor only when there are no other constructors for the class.

赞题库

赞题库-搜题找答案

(已有500万+用户使用)


  • 历年真题

  • 章节练习

  • 每日一练

  • 高频考题

  • 错题收藏

  • 在线模考

  • 提分密卷

  • 模拟试题

无需下载 立即使用

版权所有©考试资料网(ppkao.com)All Rights Reserved