网络 大数值对象;就是四舍五入方式;大数据
Thus, using simple data types, such as string, integer, float, and even BigDecimal, are natural.
因此,可以自然地使用简单的数据类型,比如 string、integer、 float,甚至是 BigDecimal。
If you need to represent fixed point Numbers, such as dollars and cents, use BigDecimal instead.
如果需要表示定点数(譬如,几美元和几美分),则使用BigDecimal。
Because BigDecimal objects are immutable, each of these methods produces a new BigDecimal object.
由于BigDecimal对象是不可变的,这些方法中的每一个都会产生新的BigDecimal对象。
For this reason, BigDecimal gives you explicit control over rounding when performing division operations.
出于这个原因,在进行除法运算时,BigDecimal可以让您显式地控制舍入。
If you are looking to represent exact quantities such as monetary amounts, BigDecimal is well-suited to the task.
如果您正在寻找一种能精确表示如货币量这样的数值,则BigDecimal可以很好地胜任该任务。