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

题目内容 (请给出正确答案)

System.out.println("5" + 2);的输出结果应该是()

  • A、52
  • B、7
  • C、2
  • D、5

参考答案

更多 “System.out.println("5" + 2);的输出结果应该是()A、52B、7C、2D、5” 相关考题
考题 如下代码:publicvoidTest(){try{oneMethod();System.out.println(condition1);}catch(ArrayIndexOutOfBoundsExceptione){System.out.println(condition2);}catch(Exceptione){System.out.println(condition3);}finally{System.out.println(finally);}}如果oneMethod正常运行,则输出结果中是?()A.condition1finallyB.condition2finallyC.condition3finallyD.finally

考题 int[]my_Array;my_Array=newint[5];for(intcount=0;count=5;count++)System.out.println(my_Array[count]);以上Java代码运行的结果是()。 A.将1,2,3,4,5输出到屏幕B.将0,1,2,3,4输出到屏幕C.将0,1,2,3,4,5输出到屏幕D.将出现运行时异常

考题 int[]my_Array;my_Array=newint[5];for(intcount=0;count=5;count++)System.out.println(my_Array[count]);结果是() A.将1,2,3,4,5输出到屏幕B.将0,1,2,3,4输出到屏幕C.将0,1,2,3,4,5输出到屏幕D.将出现运行时异常

考题 研究下面的Java代码:switch(x){case1:System.out.println(1);case2:case3:System.out.println(3);case4:System.out.println(4);}当x=2时,运行结果是()。 A.没有输出任何结果B.输出结果为3C.输出结果是3和4D.输出结果是1、3和4

考题 下面程序段的输出结果是( )。 public class Test { public static void main(String args[ ]){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if (x>y) System.out.println("x>y"); else if (x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

考题 已知如下代码: switch(m) { case 0: System.out.println("Condition0"); case 1: System.out.println("Condition 1"); case 2: System.out.println("Condition 2"); case 3: System.out.println("Condition 3"); break; default: System.out.println("Other cCndition"); } 当m为( )时,"Condition 2"会出现在输出结果中。A.2B.0、1C.0、1、2D.0、1、2、3

考题 下面程序段的输出结果是( )。 public class Test{ public static void main(String args[]){ int X,y; x=(int)Math.sqrt(5)/2+(int)Math.random*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random*3/2; if(xv) System.OUt.println("xy"); elseif(x= =y) System.out.println("x=Y"); else System.out.println("xy"): } }A.xyB.x=YC.xyD.编译错误

考题 下面程序段的输出结果是( )。 public class Test { public static void main (String[] args) { int j=2,i=5; while (j<i--) j++; System.out.println(j);} }A.2B.3C.4D.5

考题 给出下列的程序段,m为何值时将会输出default? ( ) switch(m) { case 0: System.out.println("case 0"); case 1:System.out.println("case 1");break; case 2:System.out.println("case 2");break; default:System.out.println("default"); }A.0B.1C.2D.3

考题 下面代码段的输出是( )。 if (5 7 > 0 5 | 2) System.out.println("true");A.编译出错B.5752C.真D.无输出

考题 执行下面程序段的输出结果为( )。 public class Q { public static void main(String argv[]) { int anar[]一new int[5]; System.out.println(anar[0]); } }A.0B.1C.2D.5

考题 下面程序段的输出结果是______。 public class Test{ public static void main(String args[ ]){ int x,y; x=(int)Math.sqrt(5/2)+(int)Math.random( )*5/2; y=(int)Math.sqrt(3/2)+(int)Math.random( )*3/2; if(x>y) System.out.println("x>y"); else if(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

考题 给出下列的程序片段,m为( )时将会输出default。 switch (m) case ():Systemt.out.println("case 0"); case 1: System.out.println("case 1");break; case 2:System.out.println("case2");break; default:System.out.println("default");A.0B.1C.2 2D.3

考题 下面代码段的输出是( )。 if(5 8L7)08L5|2)system.out.println("true");A.编译出错B.5752C.trueD.无任何输出

考题 给出下列的程序代码片段,m为哪个值时将会输出default? switch(m) { case 0:System.out.println("case0"); case 1:System.out.println("case 1");break; case 2:System.out.println("case 2");break; default:System.out.println("default"); }A.0B.1C.2D.3

考题 下面程序段的输出结果是( )。 public class Test{ public static void main(String args[]){ int i=1: switch(i){ case0: System.OUt.println("0"); break; casel: System.out.println("1"); case2: System.OUt.println("2"); break; default: System.out.println("default"); } } }A.01B.12C.10D.21

考题 下面语句 System.out.println(4|7)的输出是()A、4B、5C、6D、7

考题 下面代码段的输出是( )。 if(57)0 5|2)system.out.println("true");A.编译出错B.5752C.trueD.无任何输出

考题 以下代码的输出结果为:System.out.println(" " +2 + 3、;System.out.println(2 + 3、;System.out.println(2 + 3 +"");System.out.println(2 + "" +3、; A.第3行出现编译错误B.输出23, 5, 5 和23.C.输出5, 5, 5 和23.D.输出 23, 5, 23 和23.

考题 以下代码段的输出结果为1. int x = 0, y = 4, z = 5;2. if (x >2、{3. if (y 以下代码段的输出结果为1. int x = 0, y = 4, z = 5;2. if (x >2、{3. if (y4. System. out .println ( "message one" );5. }6. else {7. System.out.println( "message two");8. }9. }10. else if (z >5、{11. System.out.println("message three");12. }13. else {14. System.out.println( "message four");15. }A. message oneB. message twoC. message threeD. message four

考题 编译和运行以下代码结果为:1. public class EqualsTest{2. public static void main(String args[]){3. byte A=(byte)4096;4. if(A== 4096、System.out.println("Equal");5. else System.out.println("Not Equal");6. }7. }A.在第3行出现转换丢失精度的编译错误.B.输出 "Not Equal".C.输出 "Equal".

考题 关于以下程序哪条叙述正确?1. int j = 2;2. switch ( j ) {3. case 2:4. System.out.println ("value is two");5. case 2 + 1:6. System.out.println ("value is three");7. break;8. default:9. System.out.println("value is " + j);10. break;11. }A. 第5行的表达式不合法;B. 变量j是可接受的,switch中表达式可以是byte, short, int,或long的任何类型;C. 输出为value is twoD. 输出是value is two 后跟value is threeE. 输出是value is two 后跟 value is 2

考题 研究下面的Java代码:  switch (x) {  case 1:  System.out.println(1);  case 2:  case 3:  System.out.println(3);  case 4:  System.out.println(4); }  当x=2时,运行结果是()。 A、没有输出任何结果B、输出结果为3C、输出结果是3和4D、输出结果是1、3和4

考题 int[]my_Array; my_Array=newint[5]; for(intcount=0;count=5;count++)System.out.println(my_Array[count]); 以上Java代码运行的结果是()。A、将1,2,3,4,5输出到屏幕B、将0,1,2,3,4输出到屏幕C、将0,1,2,3,4,5输出到屏幕D、将出现运行时异常

考题 单选题研究下面的Java代码:  switch (x) {  case 1:  System.out.println(1);  case 2:  case 3:  System.out.println(3);  case 4:  System.out.println(4); }  当x=2时,运行结果是()。A 没有输出任何结果B 输出结果为3C 输出结果是3和4D 输出结果是1、3和4

考题 单选题System.out.println(“abc”+1+2)输出的结果是()A IntB ShortC IntegerD Long

考题 单选题System.out.println("5" + 2);的输出结果应该是()A 52B 7C 2D 5