BigDecimal division exception

When two BigDecimal numbers are used for division, the following exception message appears:

solve:

The generated exception cannot be divided. The solution is to set the accuracy. An example is as follows

. divide(xxxxx,2,BigDecimal.ROUND_HALF_UP);

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>