Android examples for java.lang:Double
Format double Number in #,##0 format
import java.text.DecimalFormat; public class Main { public static String formattedNumber(double number) { /*from w w w . java2 s .co m*/ String fn = "0"; DecimalFormat df = new DecimalFormat("#,##0"); fn = df.format(number); return fn; } }