单项选择题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. 0
B. 1
C. 2
D. Compilation fails.
单项选择题
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. assert true;
B. assert false;
C. assert false : true;
D. assert false == true;
E. assert false: false;
单项选择题
A. ABDCBDCB
B. ABCDABCD
C. Compilation fails.
D. An exception is thrown 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. finally
B. exception finished
C. finally exception finished
D. Compilation fails.
单项选择题
A.x=1
B.x=3
C.Compilation fails.
D.The code runs with no output. 
E.An exception is thrown at runtime.
单项选择题
A. public
B. private
C. protected
D. transient
E. default access