要点提示:通过显式转换,浮点数可以转换为整数 注意:类型转换不改变被转换的变量。例如 double b = 4.5; int i = (int)b; d在类型转换之后值不变。 来源:https://www.cnblogs.com/cglib/p/11947058.html 标签 类型转换