Java中double转BigDecimal的注意事项
问题:BigDecimal countTurnover = new BigDecimal(double val); //不靠谱解释:首先是BigDecimal的double参数构造,在官方JDK文档中对这个构造是这么描述的:public BigDecimal(double val)Translates a double into a BigDecimal which is the exact decimal representation of the double's binary .
转载
2020-05-20 11:15:59 ·
347 阅读 ·
0 评论