题库 第6190页
单选题:What will happen if you compile/run the following lines of code?
What will happen if you compile/run the following lines of code? @[A](2)```JavaVector a = new Vector();a.addElement(10…
单选题:For code below:
For code below:```Javaclass TestBed { TestBed() {} void f() { System.out.println("f()"); } public static void main(Strin…
单选题:Given code below:
Given code below:```Javaclass Base{ public final void method() { System.out.println("Base.method"); }}public final clas…
单选题:What will happen when you attempt to compile and run this code?
What will happen when you attempt to compile and run this code? @[D](2)```Javaclass Base { void f(int i) {System.out.pr…
单选题:Given the following code:
Given the following code: ```Javapublic class Test { String s; static class Inner { void testMethod() { s = "Hello wo…
单选题:设有如下代码段:
设有如下代码段: @[D](2)```class A { int i, j; public void fun() { i++; j++; }}class B extends A { s…
单选题:对于如下代码段,说法不正确的是:
对于如下代码段,说法不正确的是: @[B](2)```class TreeNode: def __init__(self, value): self.leftChild = None self.rightChi…
单选题:如果变量定义如下,则正确的语句是( )。
如果变量定义如下,则正确的语句是( )。 @[E](1)```int i, j, tab[3][4];```A. ```tab[0][ ] = 0;```B. ```tab[ ][3] = 3;```C. ```tab = 100;``…
单选题:设类AA已定义,假设以下语句全部合法,哪些语句会触发调用构造函数( )。
设类AA已定义,假设以下语句全部合法,哪些语句会触发调用构造函数( )。 @[A](2)```AA a; //1AA b(12, 10); //2AA c(b); //3a.SetX(32); //4```A. 1 和 2B. 1、2…
单选题:下面程序的运行结果为
下面程序的运行结果为 @[C](2)```#includeclass A{ int num;public: A(int i){num=i;} A(A &a){num=a.num++;} void print(){cout˂˂nu…