Here you can find the source of round(BigDecimal amount)
public static BigDecimal round(BigDecimal amount)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static BigDecimal round(BigDecimal amount) { if (amount != null) { return amount.setScale(2, RoundingMode.HALF_UP); } else {// w w w . j a v a 2 s. co m return null; } } }