Here you can find the source of format_BigDecimal(BigDecimal decimal, Integer scale)
public static String format_BigDecimal(BigDecimal decimal, Integer scale)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static String format_BigDecimal(BigDecimal decimal, Integer scale) { if (decimal == null) { return null; }/*from w ww . j a va2 s . c o m*/ if (scale == null) { return decimal.toPlainString(); } return decimal.setScale(scale, RoundingMode.HALF_UP).toPlainString(); } }