publicclassDome7{publicstaticvoidmain(String[] args){int a =10;int b =20;
a+=b;//a = a + b
a-=b;//a = a - bSystem.out.println(a);//字符串连接符 + , StringSystem.out.println(""+a+b);System.out.println(a+b+"");}
扩展赋值运算符public class Dome7 { public static void main(String[] args) { int a = 10; int b = 20; a+=b;//a = a + b a-=b;//a = a - b System.out.println(a); //字符串连接符 + , String System.out.println(""+a