网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
intindex=1;int[]foo=newint[3];intbar=foo[index];intbaz=bar+index;Whatistheresult?()
A.Bazhasthevalueof0
B.Bazhasthevalueof1
C.Bazhasthevalueof2
D.Anexceptionisthrown.
E.Thecodewillnotcompile.
参考答案
更多 “ intindex=1;int[]foo=newint[3];intbar=foo[index];intbaz=bar+index;Whatistheresult?() A.Bazhasthevalueof0B.Bazhasthevalueof1C.Bazhasthevalueof2D.Anexceptionisthrown.E.Thecodewillnotcompile. ” 相关考题
考题
Given:6.%int[]nums={42,420,4200};7.request.setAttribute(foo,nums);%Whichtwosuccessfullytranslateandresultinavalueoftrue?()
A.${trueorfalse}B.${requestScope[foo][0]500}C.${requestScope[’foo’][1]=420}D.${(requestScope[’foo’][0]lt50)(3gt2)}
考题
Given:1.%int[]nums={42,420,4200};2.request.setAttribute(foo,nums);%3.${5+3lt6}4.${requestScope[’foo’][0]ne10div0}5.${10div0}Whatistheresult?()
A.TruetrueB.FalsetrueC.Falsetrue0D.TruetrueInfinityE.FalsetrueInfinity
考题
intindex=1;String[]test=newString[3];Stringfoo=test[index];Whatistheresult?()
A.Foohasthevalue“”B.FoohasthevaluenullC.AnexceptionisthrownD.Thecodewillnotcompile
考题
publicclassDelta{staticbooleanfoo(charc){System.out.print(c);returntrue;}publicstaticvoidmain(String[]argv){inti=0;for(foo(‘A’);foo(‘B’)(i2);foo(‘C’)){i++;foo(‘D’);}}}Whatistheresult?()
A.ABDCBDCBB.ABCDABCDC.Compilationfails.D.Anexceptionisthrownatruntime.
考题
publicclassTest{publicstaticvoidmain(Stringargs){classFoo{publicinti=3;}Objecto=(Object)newFoo();Foofoo=(Foo)o;System.out.printIn(foo.i);}}Whatistheresult?()
A.Compilationwillfail.B.Compilationwillsucceedandtheprogramwillprint“3”C.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline6.D.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline7.
考题
intindex=1;intfoo=newint;intbar=foo[index];intbaz=bar+index;Whatistheresult?()
A.Bazhasthevalueof0B.Bazhasthevalueof1C.Bazhasthevalueof2D.Anexceptionisthrown.E.Thecodewillnotcompile.
考题
下面程序执行后,baz的值应是______。 public class Test9 { public static void main(String[] args) { int index = 1; int fox[] = new int [3]; iht bar = fox [index]; int baz = bar + index; System.out.println(baz); } }A.0B.1C.2D.编译错误
考题
关于以下初始化序列的执行结果的说法正确的是( )。 int index=1; int[] foo=new int[3]; int bar=foo[index]; int baz=bar+index;A.baz的值为0B.baz的值为1C.编译通过,但产生异常D.编译不能通过
考题
下列程序执行后,baz的值应是 int index=1; int fox[ ]=new int[3]; Int bar=fox[index]; int baz:bar+index;A.0B.1C.2D.编译错误
热门标签
最新试卷