Here you can find the source of round(BigDecimal aValue, int aScale)
public static BigDecimal round(BigDecimal aValue, int aScale)
//package com.java2s; import java.math.BigDecimal; public class Main { public static BigDecimal round(BigDecimal aValue, int aScale) { if (aValue == null) return null; aValue = aValue.setScale(aScale, BigDecimal.ROUND_HALF_UP); return aValue; }/*from w w w . ja v a 2 s . c o m*/ }