System.out.println("5" + 2);的输出结果应该是()。
举一反三
- 请看下面的程序代码,当 n 为( )值时,程序段将输出字符串 second。 [br][/br] switch(n) { [br][/br] case 0: System .out .println(“first”); [br][/br] case 1: [br][/br] case 2: System .out .println(“second”); break; [br][/br] default: System .out .println(“end”); [br][/br] }(2.0) A: 0 B: 1 C: 2 D: 以上都可以
- 以下程序段的输出结果为 【14】 。int x=0,y=4,z=5;if(x>2)if(y<5)System. out. println("Message one");elseSystem. out . println("Message two");else if(z>5)System. out. println("Message three");elseSystem. out. println("Message four");
- 以下代码段的输出结果为1. int x = 0, y = 4, z = 5;2. if (x > 2) {3. if (y < 5) {4. 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 one B: message two C: message three D: message four
- 中国大学MOOC: 2.下面代码片断的输出结果是什么? int n1 = 5; int n2 = 2; System.out.println(" n1= " + (++n1));//结果为:System.out.println(" n1= " + (n1++));//结果为:System.out.println(" n1= " + n1); //结果为:int n3 = n2++; int n4 = ++n2; System.out.println(" n3= " + n3); //结果为:System.out.println(" n4= " + n4); //结果为:System.out.println(" n2= " + n2); //结果为:
- 请写出下列语句的输出结果:System.out.println(String.valueOf(10D));System.out.println(String.valueOf(3>2));