Numeric promotion is applied to the operands of an arithmetic operator.
Numeric promotion contexts allow the use of:
• an identity conversion (§5.1.1)
• a widening primitive conversion (§5.1.2)
• an unboxing conversion (§5.1.8)
Numeric promotions are used to convert the operands of a numeric operator to a common type so that an operation can be performed. The two kinds of numeric promotion are unary numeric promotion (§5.6.1) and binary numeric promotion (§5.6.2).
Some operators apply unary numeric promotion to a single operand, which must produce a value of a numeric type:
• If the operand is of compile-time type
Integer, it is subjected to unboxing conversion ...