int与Double类型转换

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

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

 

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

posted @ 2018-06-29 17:31  逝年的我们  阅读(3126)  评论(0编辑  收藏  举报