There are two ways to convert data types. One is the default cast. For example, when data of types char, short, Int, Long and float are assigned to variables of type double, the compiler will automatically realize the conversion, because this conversion is inherently lossy when the accuracy is high. The other is to manually force type conversion, such as dnum = (double) inum; That is to say, the plastic variable inum is converted into double-precision data first, and then paid to dnum. When assigning a high-precision type variable to a low-precision type variable, the compiler will prompt you unless you cast it manually.