为什么a = a + 1是错,而a += 1是对? 分析 因为1是int类型,因此a + 1也是int类型,故需要将int类型强转为short类型,所以a = a + 1是错的; 而 a += 1之所以正确,是因为它进行了不为人知的类型转换,即a = (short)(a + 1)。