package com.liu.operator;
public class Demo4 {
public static void main(String[] args) {
int a = 10;
int b = 20;
a+=b;// a=a+b
System.out.println(a);
//字符串链接符 String
//如果输出语句有字符串类型 字符串类型前面会运算,后面的不会运算会拼接
System.out.println(a+b+" "+a+b);
System.out.println(" "+a+b);
}
}
原文:https://www.cnblogs.com/sm12580/p/15207875.html