Here you can find the source of getFormattedNumber(int number)
public static String getFormattedNumber(int number)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { private static DecimalFormat formatter = new DecimalFormat("###,###"); public static String getFormattedNumber(int number) { return formatter.format(number); }//from w w w .j a v a 2s . com }