【Java】BigDecimal中的divide方法報錯,Exception in thread "main" java.lang.ArithmeticException:

一、問題 在使用BigDecimal做除法時,報錯如下: Exception in thread 「main」 java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. 二、解決辦法: 三、原因 1、divide如果做整除,沒有報錯; 2、如果除不
相關文章
相關標籤/搜索