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

题目内容 (请给出正确答案)
classBeta{publicstaticvoidmain(String[]args){Integerx=newInteger(6)*7;if(x!=42){System.out.print(42”);}elseif(xSystem.out.println(less”);}else{System.out.print(done”);}}}结果是什么?()

A.done

B.编译失败

C.运行的时候有异常抛出

D.less

E.42


参考答案

更多 “ classBeta{publicstaticvoidmain(String[]args){Integerx=newInteger(6)*7;if(x!=42){System.out.print(42”);}elseif(xSystem.out.println(less”);}else{System.out.print(done”);}}}结果是什么?() A.doneB.编译失败C.运行的时候有异常抛出D.lessE.42 ” 相关考题
考题 classFlow{publicstaticvoidmain(String[]args){try{System.out.print(before);doRiskyThing();System.out.print(after);}catch(Exceptionfe){System.out.print(catch);}System.out.println(done);}publicstaticvoiddoRiskyThing()throwsException{//thiscodereturnsunlessitthrowsanException}}可能会产生下面哪两项结果?()A.beforeB.beforecatchC.beforeafterdoneD.beforecatchdone

考题 classBeta{publicstaticvoidmain(String[]args){Integerx=newInteger(6)*7;if(x!=42){System.out.print(42);}elseif(x.equals(42)){System.out.print(dot=);}else{System.out.print(done);}}}结果为:()A.42B.doneC.dot=D.编译失败

考题 classPasser{staticfinalintx=5;publicstaticvoidmain(String[]args){newPasser().go(x);System.out.print(x);}voidgo(intx){System.out.print(++x);}}结果是什么?() A.55B.56C.65D.66

考题 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.编译失败

考题 现有classParserextendsUtils{publicstaticvoidmain(String[]args){try{System.out.print(newParser().getlnt("42"))}catch(Exceptione){System.out.println("Exc");}}intgetlnt(Stringarg)throwsException{returnInteger.parselnt(arg);}}classUtils{intgetlnt(){return42;}}结果是什么?()

考题 现有:classFlow{publicstaticvoidmain(String[]args)try{System.out.print(before);doRiskyThing();System.out.print(after);}catch(Exceptionfe){System.out.print(catch);}System.out.println(done);}publicstaticvoiddoRiskyThing()throwsException{//thiscodereturnsunlessitthrowsanException}}可能会产生哪两项结果?()A.beforecatchB.beforeafterdoneC.beforecatchdoneD.beforeaftercatch

考题 现有:classPasserfstaticfinalintX=5;publicstaticvoidmain(String[]args){newPasser().go(x);System.out.print(x);}voidgo(intx){System.out.print(x++);}结果是什么?() A.55B.56C.65D.66

考题 28、下列程序输出结果是什么? public class E { public static void main(String[] args) { int x=1,y=6; while(y-->0) { x--; } System.out.print("x="+x+",y="+y); } }

考题 下列程序输出结果是什么? public class E { public static void main(String[] args) { int x=1,y=6; while(y-->0) { x--; } System.out.print("x="+x+",y="+y); } }