java - += 和 + 运算之后赋值有什么区别
巴扎黑
巴扎黑 2017-04-18 10:43:20
0
2
394
巴扎黑
巴扎黑

reply all(2)
PHPzhong

Why is the second sentence wrong?
Because the sum of short and int is not equal to short, and the value is assigned to short without forced conversion
+= implicitly includes the result of forced conversion as short

巴扎黑

Post a link, it has been explained very clearly.
https://my.oschina.net/u/2411...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template