int i = 128;
byte = (byte)i; //类型(变量名)
注意点
1.不能对布尔值转换
2.不能把对象类型转换为不相干的类型
3.低转高
4.可能存在内存溢出,精度问题。
//操作性比较大时,注意溢出问题