📜  roundingmode.half_down 示例 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:44.331000             🧑  作者: Mango

代码示例1
BigDecimal bd = new BigDecimal(1.555d);
System.out.println("bd=" + bd);
bd = bd.setScale(2, RoundingMode.HALF_UP);
System.out.println("after rounding bd=" + bd);
double d = bd.doubleValue();
System.out.println("after rounding d=" + d);