关于变量的一些小细节:
1. byte a=4;
byte b=3;
byte c=7;
a=b+c;
编译会出错。
2.int x=3;
x=x++;
结果:x=3
因为运行时是:temp=3;
x=x+1;
x=temp;(赋值语句的缘由)
int x=3;
x=++x;
结果:x=4
3.byte a=3;
a+=2;
编译正确;
byte a=3;
a=a+2;
编译错误;