Java will perform automatic type conversion when the following conditions are met:
(1) The data type before conversion is compatible with the data type after conversion.
(2) The representation range of the converted data type is larger than that before conversion.
The representation range of double is greater than int, and the condition (2) is satisfied. Therefore, java will automatically convert the variable 100 from the original int type to the double type.