Compilation fails.
ClassC is displayed.
The code runs with no output.
An exception is thrown at runtime.
第1题:
10. public class ClassA { 11. public void count(int i) { 12. count(++i); 13. } 14. } And: 20. ClassA a = new ClassA(); 21. a.count(3); Which exception or error should be thrown by the virtual machine?()
第2题:
Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()
第3题:
A.
B.
C.
D.
E.
F.
第4题:
Which will declare a method that forces a subclass to implement it? ()
第5题:
Which two are valid declarations within an interface definition?()
第6题:
Which will declare a method that is available to all members of the same package and can be referenced without an instance of the class?()
第7题:
public class TestA{ public void methodA() throws IOException{ //…… } } public class TestB extends TestA{ public void methodA() throws EOFException{ //…… } } public class TestC extends TestA{ public void methodA() throws Exception{ //…… } } 当编译类TestC的时候,结果是哪项?()
第8题:
下面程序输出的结果为 #include"iostream.h” class A { public: A(){cout<<"CLASSA"<<endl;} ~A() {} }; class B:public A { public: B(){cout<<"CLASS B"<<endl;} ~B(){} }; void main() { A*p; p=new B;
A.CLASS A CLASS B CLASS B CLASS B
B.CLASS A CLASS B CLASS A CLASS B
C.CLASS A CLASS B CLASS B
D.CLASS A CLASS B
第9题:
interface Data { public void load(); } abstract class Info { public abstract void load(); } Which class correctly uses the Data interface and Info class?()
第10题:
在接口中以下哪条定义是正确的?()