单项选择题
What produces a compiler error?()
A. class A { public A(int x) {} }
B. class A {} class B extends A { B() {} }
C. class A { A() {} } class B { public B() {} }
D. class Z { public Z(int) {} } class A extends Z {}
点击查看答案&解析
相关考题
-
多项选择题
Whichfourcanbethrownusingthethrowstatement?()
A. Error
B. Event
C. Object
D. Throwable
E. Exception
F. RuntimeException -
单项选择题
1. abstract class AbstractIt { 2. abstract float getFloat(); 3. } 4. public class AbstractTest extends AbstractIt { 5. private float f1 = 1.0f; 6. private float getFloat() { return f1; } 7. } What is the result?()
A. Compilation succeeds.
B. An exception is thrown.
C. Compilation fails because of an error at line 2.
D. Compilation fails because of an error at line 6. -
单项选择题
public class Test {} What is the prototype of the default constructor?()
A. Test()
B. Test(void)
C. public Test()
D. public Test(void)
E. public void Test()
