int decimalPlaces = 2;
// Truncates the big decimal value.
bd = bd.setScale(decimalPlaces, BigDecimal.ROUND_DOWN);
String string = bd.toString();
Setting the Decimal Place of a Big Decimal Value
最新推荐文章于 2024-08-25 23:47:57 发布
int decimalPlaces = 2;
// Truncates the big decimal value.
bd = bd.setScale(decimalPlaces, BigDecimal.ROUND_DOWN);
String string = bd.toString();