Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Locale; public class Main { public static String getPercentString(float percent) { return String.format(Locale.US, "%d%%", (int) (percent * 100)); } }