int length1 = 5;
length2 += length1
//length2 = length1 + length2
short length3 = 7;
//length4 = length3+length4;编译不通过
length4 +=length3;//编译通过
//这里的上面两个式子并不是完全相同
+=不改变原有的数据类型
int length1 = 5;
length2 += length1
//length2 = length1 + length2
short length3 = 7;
//length4 = length3+length4;编译不通过
length4 +=length3;//编译通过
//这里的上面两个式子并不是完全相同
+=不改变原有的数据类型