网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
classCalc{2.publicstaticvoidmain(String[]args){3.try{4.intx=Integer.parseInt("42a");5.//insertcodehere6.System.out.print("oops");7.}8.}9.}下面哪两行分别插入到第五行,会导致输出oops”?()
A.}catch(ClassCastExceptionc){
B.}catch(IllegalStateExceptionc){
C.}catch(NumberFormatExceptionn){
D.}catch(IllegalArgumentExceptione){
参考答案
更多 “ classCalc{2.publicstaticvoidmain(String[]args){3.try{4.intx=Integer.parseInt(42a);5.//insertcodehere6.System.out.print(oops);7.}8.}9.}下面哪两行分别插入到第五行,会导致输出oops”?() A.}catch(ClassCastExceptionc){B.}catch(IllegalStateExceptionc){C.}catch(NumberFormatExceptionn){D.}catch(IllegalArgumentExceptione){ ” 相关考题
考题
在PowerPoint 2003中,删除幻灯片的操作可以是()。A.单击常用工具栏中的quot粘贴quot按钮B.选择quot编辑quot菜单中的quot删除幻灯片quot选项C.选择quot编辑quot菜单中的quot清除quot选项D.单击常用工具栏中的quot复制quot按钮
考题
Given1.publicclassFoo{2.publicstaticvoidmain(String[]args)}3.try{return;}4.finally{Syste.out.printIn(Finally”);}5.}6.}Whatistheresult()?
A.Theprogramrunsandprintsnothing.B.Theprogramrunsandprints“Finally”.C.Thecodecomiles.Butanexceptionisthrownatruntime.D.Thecodewillnotcompilebecausethecatchblockismissing.
考题
现有2个文件:1.packagex;2.publicclassX{3.publicstaticvoiddoX(){System.out.print(doXdoX);}4.}和:1.classFind{2.publicstaticvoidmain(String[]args){3.//insertcodehere4.}5.}哪两行分别插入到类Find的第3行将编译并产生输出doX”?()A.doX();B.X.doX();C.x.X.doX();D.x.XmyX=newx.X();myX.doX();
考题
importjava.util.*;2.3.ClassFindStuff{4.publicstaticvoidmain(String[]args){5.//insertcodehere6.c.put(x,123);7.}8.}分别插入到第5行,哪三行允许代码编译?()
A.Mapc=newSortedMap();B.HashMapc=newHashMap();C.HashMapc=newHashtable();D.SortedMapc=newTreeMap();
考题
classHorseRadish{2.//insertcodehere3.protectedHorseRadish(intx){4.System.out.println(bokchoy);5.}6.}7.classWasabiextendsHorseRadish{8.publicstaticvoidmain(String[]args){9.Wasabiw=newWasabi();10.}11.}分别插入到第2行,哪两项允许代码编译并产生bokchoy输出结果?()A.//justacommentB.protectedHorseRadish(){}C.protectedHorseRadish(){this(42);}D.protectedHorseRadish(){newHorseRadish(42);}
考题
现有:1.importjava.util.*;2.3.ClassFindStuff{4.publicstaticvoidmain(String[]args){5,//insertcodehere6.c.put(X,123);7.}8.}分别插入到第5行,哪三行允许代码编译?()
A.Mapc=newSortedMap();B.HashMapc=newHashMap();C.HashMapc=newHashtalole();D.SortedMapc=newTreeMap();E.ArrayListc=newArrayList();F.MaDc=newLinkedHashMap();
考题
现有1.classCalc{2.publicstaticvoidmain(String[]args){3.try{4.intx=Integer.parselnt(42a);5.//insertcodehere6.System.out.print(oops);7.}8.}9.}下面哪两行分别插入到第五行,会导致输oops?()
A.}catch(IllegalArgumentExceptione){B.}catch(IllegalStateExceptionc){C.}catch(NumbelFormatExceptionn){D.}catch(ClassCastExceptionc){
考题
现有:classHorseRadish{//insertcodehereprotectedHorseRadish(intx){System.out.println(bokchoy);}}classWasabiextendsHorseRadish{publicstaticvoidmain(String[]args){Wasabiw-newWasabi();}}分别插入到第2行,哪两项允许代码编译并产生”bokchoy”输出结果()A.protectedHorseRadish(){this(42);}B.protectedHorseRadish(){}C.//justacommentD.protectedHorseRadish(){newHorseRadish(42);}
考题
现有2个文件:packagex;publicclassX{publicstaticvoiddoX(){System.out.print(doX);}}和:classFind{publicstaticvoidmain(String[]args){//insertcodehere}}哪两行分别插入到类Find的第3行将编译并产生输出doX”?()
A.doX();B.X.doX();C.x.X.doX();D.x.XmyX=newx.X();myX.doX();
热门标签
最新试卷