Here you can find the source of formatPercent(double v)
public static String formatPercent(double v)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { public static String formatPercent(double v) { return new DecimalFormat("#.####%").format(v); }/*from www . jav a 2 s . c om*/ }