|
|
|
|
|
by aeonsky
3935 days ago
|
|
JLS: https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.htm... Otherwise, if the second and third operands have types that are convertible (§5.1.8) to numeric types, then there are several cases: ... binary numeric promotion (§5.6.2) is applied to the operand types, and the type of the conditional expression is the promoted type of the second and third operands. ... If either operand is of type double, the other is converted to double. |
|