import java.util.*;
public class GSX52 {
public static void main(String[] args) {
int x=0,y=1,z=2;
String s = "x,y,z";
System.out.println(s+x+y+z);
System.out.println(x+" "+s);
s += "(summed) = ";
System.out.println(s+(x+y+z));
System.out.println(" "+ x);
}
}
运行结果配图
此方法亦可以称作字符串的拼接操作