publicclassTestApp{publicstaticvoidmain(String[]args){try{inti=0;intj=1/i;Stringmyname=null;if(myname.length()2)System.out.print(1”);}catch(NullPointerExceptione){System.out.print(2”);}catch(Exceptione){System.out.print(3”);}}}上述程序运行后的输出是哪项?()A.3B.2C.231D.32

publicclassTestApp{publicstaticvoidmain(String[]args){try{inti=0;intj=1/i;Stringmyname=null;if(myname.length()>2)System.out.print(1”);}catch(NullPointerExceptione){System.out.print(2”);}catch(Exceptione){System.out.print(3”);}}}上述程序运行后的输出是哪项?()

A.3

B.2

C.231

D.32


相关考题:

执行下列程序段之后,输出的结果为______。public class exl0{public static void main(String[] args){int i=3;int j=7;int k=8;boolean b=j>i∧k!=i;System.out.println(b);}}

publicclassTestApp{publicstaticvoidmain(String[]args){try{inti=0;intj=1/i;System.out.println(1”);}catch(Exceptione){System.out.print(3”);}finally{System.out.print(4”);}}}上述程序运行后的输出是哪项?() A.4B.34C.43D.14

publicclassTestApp{publicstaticvoidmain(String[]args){try{Stringmyname=null;if(myname.length()2)System.out.print(1”);}catch(NullPointerExceptione){System.out.print(2”);}}}上述程序运行后的输出是哪项?() A.1B.12C.21D.2

publicclassFoo{publicstaticvoidmain(String[]args){inti=1;intj=i++;if((i++j)(i++==j)){i+=j;}}}Whatisthefinalvalueofi?() A.1B.2C.3D.4E.5

下列程序执行之后,输出的结果是______。 public class exl0 { public static void main(String[] args) { int j=0; a1: for (int i=3;i>0; i--) { j+=i; a2: for (int k=l; k<3; k++) { j*=k; if(i==k) break a1; } } System.out.println(j); } }A.18B.16C.14D.0

执行下列程序段之后,变量b的值为( )。 public class Test { public static void main (String[] args) { int i = 12; int j = 24; boolean b1 = true; booleanb=(j%i==0)(! b1) || (j/i! =2); System. out. println (B); } }A.trueB.falseC.0D.1

下列程序执行之后,输出的结果是______。 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

下列程序执行后的结果是______。public class ex24{public static void main(String[] args){int j=10;a1: for(int i=3;i>0;i--){j-=i;int m=l;a2: while (m<j){if (i<=m)continue a1;j/=m++;}}System.out.println(j);}}下列嵌套的循环程序执行后,结果是______。 public class ax25 { public static void main(String[] args) { int sum=0; for(int i=0;i<=5;i++) { for(int j=10;j>3*i;j--) { sum+=j*i; } } System.out.println(sum); } }A.136B.127C.147D.153

执行下列程序段之后,变量b的值为______。 public class Test9 { public static void main(String[] args) { int i=12; int j=24; boolean b1=true; boolean b=(j%i== 0)(!b1) ||(j/i!=2); System.out.println(b); } }A.trueB.假C.1D.0