字符串在前,基本数据类型基本上沦陷为拼接 public class Demo2 { public static void main(String[] args) { int a =3; int b = 4; String str = "hell0"; System.out.println(a+b + str); //7hello System.out.println(str+a+b); //hello34 System.out.println(str+(a+b)); //hell07 }