Here you can find the source of formatForPercentage(BigDecimal value)
public static String formatForPercentage(BigDecimal value)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.text.DecimalFormat; public class Main { public static final String PERCENTAGE_FORMAT = "#,##0.00%"; public static String formatForPercentage(BigDecimal value) { String perValue = percentageFormat(value); return perValue.substring(0, perValue.length() - 1); }/* ww w . j a v a 2 s . c o m*/ public static String percentageFormat(BigDecimal value) { return new DecimalFormat(PERCENTAGE_FORMAT).format(value); } }