Given:11.Stringtest="TestA.TestB.TestC.";12.//insertcodehere13.String[]result=test.split(regex);Whichregularexpression,insertedatline12,correctlysplitstestinto"TestA","TestB",and"TestC"?()
A.Stringregex="";
B.Stringregex="";
C.Stringregex=".*";
D.Stringregex="\\s";
E.Stringregex="\\.\\s*";
第1题:
A.Anexceptionisthrownatruntime.
B.1
C.4
D.Compilationfails.
E.0
第2题:
A.abc
B.123
C.a1b2c3
D.a1b2c3
第3题:
下面的方法,当参数值为2的时候返回值是多少 1. public int getValue(int i) { 2. int result = 0; 3. switch (i) { 4. case 1: 5. result = result + i; 6. case 2: 7. result = result + i * 2; 8. case 3: 9. result = result + i * 3; 10. } 11. return result; 12. }
A.10
B.8
C.6
D.4
E.2
F.0
第4题:
A.0
B.1
C.4
D.Compilationfails.
第5题:
A.final
B.static
C.native
D.public
E.private