单项选择题X 纠错

A. public void getNum(){}
B. public void getNum(double d){}
C. public float getNum() { return 4.0f; }
D. public double getNum(float d) { return 4.0d; }

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

你可能喜欢

单项选择题

A. It prints f2[0] = 0.0.
B. It prints f2[0] = NaN.
C. An error at line 5 causes compile to fail.
D. An error at line 6 causes compile to fail.
E. An error at line 6 causes an expectation at runtime.

多项选择题

A. public int method1(int a, int b) { return 0; }
B. private int method1(int a, int b) { return 0; }
C. private int method1(int a, long b) { return 0; }
D. public short method1(int a, int b) { return 0: }
E. static protected int method1(int a, int b) { return 0; }

单项选择题

A. x = 0
B. x = 42
C. Compilation fails because of an error in line 2 of class Test2.
D. Compilation fails because of an error in line 3 of class Test1.
E. Compilation fails because of an error in line 4 of class Test2.

多项选择题

A. final int k = 4;
B. public int k = 4;
C. static int k = 4;
D. abstract int k = 4;
E. volatile int k = 4;
F. protected int k = 4;

单项选择题

A.x=1
B.x=3
C.Compilation fails.
D.The code runs with no output. 
E.An exception is thrown at runtime.

赞题库

赞题库-搜题找答案

(已有500万+用户使用)


  • 历年真题

  • 章节练习

  • 每日一练

  • 高频考题

  • 错题收藏

  • 在线模考

  • 提分密卷

  • 模拟试题

无需下载 立即使用

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