package operator;
public class Demo07 {
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+b);
System.out.println(a+b+"");
}
}
运算符号简写方法和字串连接符
最新推荐文章于 2022-01-17 22:14:30 发布