more precise numeric datatype than double?

后端 未结 6 1945
南方客
南方客 2021-02-07 14:02

Is there a datatype in Java that stores a decimal number more precisely than a double?

6条回答
  •  醉话见心
    2021-02-07 14:21

    you can use a BigDecimal

    To calculate with with BigDeciamls this class provides special methods that are used instead of the standard operators e.g. + - * / ... that you from int, double and so on...

提交回复
热议问题