A.0
B.1
C.4
D.Compilationfails.
E.Anexceptionisthrownatruntime.
第1题:
A.Thecodecompilesand“s=”isprinted.
B.Thecodecompilesand“s=null”isprinted.
C.Thecodedoesnotcompilebecausestringsisnotinitialized.
D.Thecodedoesnotcompilebecausestringscannotbereferenced.
E.Thecodecompiles,butaNullPointerExceptionisthrownwhentoStringiscalled.
第2题:
A.0
B.1
C.4
D.Compilationfails.
第3题:
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*";
第4题:
A.Anexceptionisthrownatruntime.
B.1
C.4
D.Compilationfails.
E.0
第5题:
A.abc
B.123
C.a1b2c3
D.a1b2c3