Compare if BigDecimal is greater than zero

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

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

7条回答
  •  执笔经年
    2020-12-22 22:06

    Possible better way:

    if (value.signum() > 0)
    

    signum returns -1, 0, or 1 as the value of this BigDecimal is negative, zero, or positive.

提交回复
热议问题