Compare if BigDecimal is greater than zero

后端 未结 7 2046
既然无缘
既然无缘 2020-12-22 21:23

How can I compare if BigDecimal value is greater than zero?

7条回答
  •  情深已故
    2020-12-22 22:10

    using ".intValue()" on BigDecimal object is not right when you want to check if its grater than zero. The only option left is ".compareTo()" method.

提交回复
热议问题