【MapSheep】
[好记性不如烂笔头]
摘要: 示例代码 字符串转换数字类型转换错误。 不能把"0.9"转成Integer. 因为双精度的数字不能转成Integer, 因为正数才可以转成Integer。 错误示例 阅读全文
posted @ 2021-02-20 16:38 (Play) 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 示例代码 public class Company { public static void main(String[] args) { // 示例, 支持0.2开头 String currentVoltage = "20.014"; // 转换双精度 int totalFee1 = (int) ( 阅读全文
posted @ 2021-02-20 16:30 (Play) 阅读(2695) 评论(0) 推荐(0) 编辑