System.out.println("hello");System.out.println("hello");//上面代码的输出结果
举一反三
- 请看下面的程序代码,当 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: 以上都可以
- 在java中,下面()语句可以在屏幕输出"hello,world!" A: System.out.println("hello,world!"); B: system.out.println("hello.world!"); C: system.Out.println("hello,world!"); D: System.Out.println("hello,world!");
- 中国大学MOOC: 下列代码中构造方法的返回类型是()public class Village { Village () { System .out .println(“hiding in Village”) ; } public static void main( String args [ ]) { Village c =new Village ( ) ;}class Village { public static void main( String args [ ]) { Village c =new Village ( ) ; } Village () { System .out .println(“hiding in Village”) ; } }
- StringBuffer s1=new StringBuffer('Hello World'); System.out.println(s1.append('Tom')); 输出结果为Hello WorldTom。
- 阅读下列代码 System.out.println(“Hello” 9 1) 下列选项中,哪个是正确的输出结果( )