现有:classTop{staticintx=l;publicTop(inty){x*=3;}}classMiddleextendsTop{publicMiddle(){x+=1;)publicstaticvoidmain(String[]args){Middlem=newMiddle();System.out.println(x);}}结果为:() A.1B.2C.3D.编译失败

现有:classTop{staticintx=l;publicTop(inty){x*=3;}}classMiddleextendsTop{publicMiddle(){x+=1;)publicstaticvoidmain(String[]args){Middlem=newMiddle();System.out.println(x);}}结果为:()

A.1

B.2

C.3

D.编译失败


相关考题:

classTestMain{staticintx=2;static{x=4;}publicstaticvoidmain(String...args){inty=x+1;System.out.println(y);}}和命令行:javaTestMain结果为:() A.3B.5C.编译失败D.运行时异常被抛出

classTop{staticintx=1;publicTop(inty){x*=3;}}classMiddleextendsTop{publicMiddle(){x+=1;}publicstaticvoidmain(String[]args){Middlem=newMiddle();System.out.println(x);}}结果为:() A.1B.2C.3D.编译失败

现有:classTestMain{staticintx=2;static{x=4;}publicstaticvoidmain(String...args){inty=x+1;System.out.println(y);}}和命令行:javaTestMain结果为:() A.3B.5C.编译失败D.运行时异常被抛出

classTestMain{staticintx=2;static{x=4;}staticpublicvoidmain(String[]args){inty=x+1;System.out.println(y);}}和命令行:javaTestMain结果为:() A.3B.5C.编译失败D.运行时异常被抛出

现有:classTestMain{staticintx=2;static{x=4;}staticpublicvoidmain(String[]args){inty=x+1;System.out.println(y);}}和命令行:javaTestMain结果为:() A.3B.5C.编译失败D.运行时异常被抛出

现有:classTop{staticintX=l;publicTop(){x*=3;}}classMiddleextendsTop{publicMiddle(){x+=l;}publicstaticvoidmain(String[]args){Middlem=newMiddle();System.out.println(x);}}结果是什么?() A.2B.3C.4D.编译失败

现有:classBanana2fstaticintX=2;publicstaticvoidmain(String[]args){intX=2;Banana2b=newBanana2();b.go(x);}static{x+=x;}voidgo(intx){++x;System.out.println(x);}结果为:() A.7B.5C.3D.2

现有:classFoo{publicstaticvoidmain(String[]args){intx=O;inty=4;for(intz=0;z3;Z++;X++){if(x1++y10)y++;}System.out.println(y);}}结果是什么?() A.7B.8C.10D.12

执行如下语句之后,输出的结果是______。 public class ex24 { public static void main(String[] args) { int x=5,y=3; x+=X-- *--y; System.out.println{x); } }A.0B.1C.trueD.false