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();