package operator;
public class Demo15 {
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+"");
//加号左右出现Stringk类型,他就会把另一个操作处或者其他操作处都转化成String再进行连接
}
}
operator study Hard.15
最新推荐文章于 2024-05-27 14:58:40 发布