Here you can find the source of round(BigDecimal money, int scale)
public static BigDecimal round(BigDecimal money, int scale)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static BigDecimal round(BigDecimal money, int scale) { if (scale < 0) { throw new IllegalArgumentException("The scale must be a positive integer or zero"); }/* w ww . ja v a2 s .c o m*/ BigDecimal one = new BigDecimal("1"); return money.divide(one, scale, BigDecimal.ROUND_HALF_UP); } }