网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
intindex=1;Stringtest=newString;Stringfoo=test[index];Whatistheresult?()
A. Foohasthevalue“”
B.Foohasthevaluenull
C.Anexceptionisthrown
D.Thecodewillnotcompile
参考答案
更多 “ intindex=1;Stringtest=newString;Stringfoo=test[index];Whatistheresult?() A. Foohasthevalue“”B.FoohasthevaluenullC.AnexceptionisthrownD.Thecodewillnotcompile ” 相关考题
考题
Given:8.intindex=1:9.Boolean[]test=newboolcan[3];10.boolcanfoo=test[index];Whatistheresult()?
A.foohasthevalueof0.B.foohasthevalueofnull.C.foohasthevalueoftrue.D.foohasthevalueoffalse.E.An-exceptionisthrown.F.Thecodewillnotcompile.
考题
Stringtest=Thisisatest”;12.String[]tokens=test.split(”\s”);13.System.out.println(tokens.length);Whatistheresult?()
A.0B.1C.4D.Compilationfails.E.Anexceptionisthrownatruntime.
考题
intindex=1;String[]test=newString[3];Stringfoo=test[index];Whatistheresult?()
A.Foohasthevalue“”B.FoohasthevaluenullC.AnexceptionisthrownD.Thecodewillnotcompile
考题
intindex=1;int[]foo=newint[3];intbar=foo[index];intbaz=bar+index;Whatistheresult?()
A.Bazhasthevalueof0B.Bazhasthevalueof1C.Bazhasthevalueof2D.Anexceptionisthrown.E.Thecodewillnotcompile.
考题
intindex=1;boolean[]test=newBoolean[3];booleanfoo=test[index];Whatistheresult?()
A.Foohasthevalueof0.B.Foohasthevalueofnull.C.Foohasthevalueoftrue.D.Foohasthevalueoffalse.E.Anexceptionisthrown.F.Thecodewillnotcompile.
考题
intindex=1;intfoo=newint;intbar=foo[index];intbaz=bar+index;Whatistheresult?()
A.Bazhasthevalueof0B.Bazhasthevalueof1C.Bazhasthevalueof2D.Anexceptionisthrown.E.Thecodewillnotcompile.
考题
Given:11.Stringtest=Thisisatest;12.String[]tokens=test.split(\s);13.System.out.println(tokens.length);Whatistheresult?()
A.Anexceptionisthrownatruntime.B.1C.4D.Compilationfails.E.0
考题
Given:11.Stringtest=Thisisatest;12.String[]tokens=test.split(\s);13.System.out.println(tokens.length);Whatistheresult?()
A.0B.1C.4D.Compilationfails.
考题
Given:11.Stringtest=a1b2c3;12.String[]tokens=test.split(\\d);13.for(Strings:tokens)System.out.print(s+);Whatistheresult?()
A.abcB.123C.a1b2c3D.a1b2c3
热门标签
最新试卷