#

type-conversion

Type promotion, narrowing conversions, implicit casts, and related pitfalls.

ProgrammingWhy Java compound assignment operators don't require casting

Java compound assignment operators (+=, -=, *=, /=) implicitly cast the promoted result back to the left-hand type, so i += j compiles without an explicit cast.

1 answer 3 views