网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

11.publicstaticvoidmain(String[]args){12.Integeri=uewInteger(1)+newInteger(2);13.switch(i){14.case3:System.out.println(”three”);break;15.default:System.out.println(”other”);break;16.}17.}Whatistheresult?()

A.three

B.other

C.Anexceptionisthrownatruntime.

D.Compilationfailsbecauseofanerroronline12.

E.Compilationfailsbecauseofanerroronline13.

F.Compilationfailsbecauseofanerroronline15.


参考答案

更多 “ 11.publicstaticvoidmain(String[]args){12.Integeri=uewInteger(1)+newInteger(2);13.switch(i){14.case3:System.out.println(”three”);break;15.default:System.out.println(”other”);break;16.}17.}Whatistheresult?()A.threeB.otherC.Anexceptionisthrownatruntime.D.Compilationfailsbecauseofanerroronline12.E.Compilationfailsbecauseofanerroronline13.F.Compilationfailsbecauseofanerroronline15. ” 相关考题
考题 classBeta{publicstaticvoidmain(String[]args){Integerx=newInteger(6)*7;if(x!=42){System.out.print(42);}elseif(x〈newInteger(44-1)){System.out.println(less);}else{System.out.print(done);}}}结果是什么?()A.lessB.42C.doneD.编译失败

考题 public static void main(String[]args){Integer i=new Integer(1)+new Integer(2);switch(i){case3:System.out.println(three);break;default:System.out.println(other);break;}}Whatistheresult?()A.threeB.otherC.Anexceptionisthrownatruntime.D.Compilationfailsbecauseofanerroronline12.E.Compilationfailsbecauseofanerroronline13.F.Compilationfailsbecauseofanerroronline15.

考题 1.importjava.util.*;2.publicclassExample{3.publicstaticvoidmain(String[]args){4.//insertcodehere5.set.add(newinteger(2));6.set.add(newinteger(l));7.System.out.println(set);8.}9.}Whichcode,insertedatline4,guaranteesthatthisprogramwilloutput[1,2]?()A.Setset=newTreeSet();B.Setset=newHashSet();C.Setset=newSortedSet();D.Listset=newSortedList();E.Setset=newLinkedHashSet();

考题 publicclassBoxer1{2.Integeri;3.intx;4.publicBoxer1(inty){5.x=i+y;6.System.out.println(x);7.}8.publicstaticvoidmain(String[]args){9.newBoxer1(newInteger(4));10.}11.}Whatistheresult?() A.Thevalue“4”isprintedatthecommandline.B.Compilationfailsbecauseofanerrorinline5.C.Compilationfailsbecauseofanerrorinline9.D.ANullPointerExceptionoccursatruntime.E.ANumberFormatExceptionoccursatruntime.F.AnIllegalStateExceptionoccursatruntime.

考题 publicclassFoo{publicstaticvoidmain(String[]args){inti=1;intj=i++;if((i++j)(i++==j)){i+=j;}}}Whatisthefinalvalueofi?() A.1B.2C.3D.4E.5

考题 publicstaticvoidmain(String[]args){Integera=newInteger(10);Integerb=newInteger(10);Integerc=a;intd=10;doublee=10.0;}Whichthreeevaluatetotrue?() A.(a==c)B.(d==e)C.(b==d)D.(a==b)E.(b==c)F.(d==10.0)

考题 以下哪个是有效的Java程序入口函数?A.public static void main(String[] args);B.public static void main();C.public static int main(String[] args);D.public static void main(int argc, String[] args)

考题 以下哪个main方法是正确的?A.public static void main(string[] args)B.public static void Main(String[] args)C.public static void main(String[] args)D.public static main(String[] args)E.public void main(String[] args)

考题 19、以下哪个是有效的Java程序入口函数?A.public static void main(String[] args);B.public static void main();C.public static int main(String[] args);D.public static void main(int argc, String[] args)