Here you can find the source of formatPercent(BigDecimal percent)
public static String formatPercent(BigDecimal percent)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberFormat; public class Main { private static final NumberFormat df = new DecimalFormat("#,###.00"); public static String formatPercent(BigDecimal percent) { return df.format(Double.parseDouble(percent.toString())) + " %"; }//from ww w.j ava 2 s . c o m }