报错原因,java中的整型常量默认类型是 int s1 + 1 后已经变成了一个 int 型的常量,不可以使用 short 类型接收正确原因:s1 += 1 相当于 <short>s1 = (short)(s1+1)