Here you can find the source of toString(BigDecimal num)
public static String toString(BigDecimal num)
//package com.java2s; import java.math.BigDecimal; public class Main { public static String toString(BigDecimal num) { if (num == null) { return "0"; } else {// w ww . j ava 2 s . c o m return num.setScale(2).toString(); } } }