Here you can find the source of printBigDecimal(BigDecimal decimal)
public static String printBigDecimal(BigDecimal decimal)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static String printBigDecimal(BigDecimal decimal) { return String.format("%.2f", decimal); }//from w ww . j a v a 2 s. c o m }