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...
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...