Java tutorial
//package com.java2s; import java.text.NumberFormat; public class Main { public static String toPercentDigital(double d) { NumberFormat nt = NumberFormat.getPercentInstance(); nt.setMinimumFractionDigits(2); return nt.format(d); } }