int与Double类型转换

it2022-05-05  121

        int totalFee = (int)(Double.parseDouble(paramMap.get("totalFee").toString())*100);

     int totalFee = (int)(Float.parseFloat(paramMap.get("totalFee").toString())*100);

 

第二种写的时候有时会使数据值变小;

转载于:https://www.cnblogs.com/wwwcf1982603555/p/9244578.html


最新回复(0)