String s1="Hello";String s2="World";System.out.println(s2+s1);运行的结果是? A: HelloWorld B: Hello World C: WorldHello D: World Hello
String s1="Hello";String s2="World";System.out.println(s2+s1);运行的结果是? A: HelloWorld B: Hello World C: WorldHello D: World Hello
import java.io.*;public class abc{public static void main(String args[ ]){ AB s = new AB("Hello!",“world”);System.out.println(s.toString( ));}} class AB {String s1;String s2;AB( String str1 , String str2 ){ s1 = str1; s2 = str2; }public String toString( ){ return s1+s2; }} A: Hello!world B: worldHello!
import java.io.*;public class abc{public static void main(String args[ ]){ AB s = new AB("Hello!",“world”);System.out.println(s.toString( ));}} class AB {String s1;String s2;AB( String str1 , String str2 ){ s1 = str1; s2 = str2; }public String toString( ){ return s1+s2; }} A: Hello!world B: worldHello!
1