Here you can find the source of formatComma(String number)
public static String formatComma(String number)
//package com.java2s; import java.text.NumberFormat; import java.util.Locale; public class Main { public static String formatComma(String number) { return formatComma(Double.parseDouble(number)); }/*from w ww.j a va 2 s . c om*/ public static String formatComma(double number) { return formatComma(number, Locale.KOREA); } public static String formatComma(String number, Locale locale) { return formatComma(Double.parseDouble(number), locale); } public static String formatComma(double number, Locale locale) { NumberFormat form = NumberFormat.getInstance(locale); return form.format(number); } }