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

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.42

B.done

C.dot=

D.编译失败


相关考题:

下面main()方法的定义哪些是正确的()。A.publicstaticvoidmain(Stringargs[]){}B.publicstaticvoidmain(String[]){}C.publicstaticvoidmain(String[]args){}D.publicstaticvoidmain(String[]x){}

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

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

现有:publicclassTester{publicstaticvoidmain(String[]args){intx-5;Integerxl=x;Integerx2=x;intx3=newInteger(5);system..ut.print(x1.equals(x));system..ut.print(xl==x);system..ut.print(x2.equals(xl));system..ut.print(x2==xl);system..ut.print(x2==x3);system..ut.print(x2.equals(x3));}}结果为:()A.编译失败B.falsefalsetruetruetruetrueC.truetruetruetruetruetrueD.falsefalsetruetruetruefalseE.truefalsetruefalsefalsetrueF.运行时异常被抛出

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.

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)

下列程序执行之后,输出的结果是______。 public class ex4 { public static void main(String[] args) { int j=0; for(int i=3;i>0;i--) { j+=i; int x=2; while(x<j) { x+=1; System.out,print(x); } } } }A.3555B.35556666C.33453456D.345

以下哪个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)

6、下列()选项是Java应用程序主类中正确的main()方法。 ‍A.static void main(String[] args)B.public void main(String[] args)C.public static void main(String args)D.public static void main(String[] args)