Here you can find the source of formatRate(BigDecimal rate)
public static String formatRate(BigDecimal rate)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static String formatRate(BigDecimal rate) { return rate.multiply(new BigDecimal(100)).toPlainString() + "%"; }// www . ja v a 2s.com }