Here you can find the source of toPercent(double percent)
public static String toPercent(double percent)
//package com.java2s; //License from project: Apache License import java.text.NumberFormat; public class Main { private static final NumberFormat FORMAT_PERCENT = NumberFormat.getNumberInstance(); public static String toPercent(double percent) { return FORMAT_PERCENT.format(percent) + "%"; }//from w w w . j a v a 2 s. c om }