public class Demo {
public static void main(String[] args){
String s1 = "abc";
String s2 = "xyz";
show(s1,s2);
System.out.println(s1+"---"+s2);
String vv = "";
System.out.println("".length());
}
static void show(String s1,String s2){
s1 = s2+s1+"Q"; //XYZABCQ
s2 = "W"+s1; //WABC
}
为何打印的结果为:abc---xyz
求指教原理!!!!!!!!!!!!!!!!!! |
|