setValue(BigDecimal value)
{
this.value=value;
this.value.setScale(8, RoundingMode.HALF_DOWN);
}
BigDecimal getValue()
{
return value;
}
setValue(0.0314159*Math.random());
我不知道为什么,但是getValue()正在生成比8更多的小数位数的BigDecimals。
我做错了什么?