//byte b='a'+'b';//compliation error ,
byte b =(int)('a'+'b')
nt或更短的表达式总是产生一个int
byte d = 3;
d += 7;
//等价于
byte d = 3;
d = (byte)(d+7);
+=,-=,*=,/= 都是隐含强制转换的。
// float a = 2.0 //compliation error
float a = 2.0f
float a = (float) 2.0
浮点的字面值隐含为double
//byte a = 128 // byte can only hold up to 127
//short s = 32768 // short 32768 short 是符合位
byte a = (byte) 128 //
字面值不能大于变量的保存范围。