Java Locale Format formatComma(String number)

Here you can find the source of formatComma(String number)

Description

format Comma

License

Open Source License

Declaration

public static String formatComma(String number) 

Method Source Code

//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);
    }
}

Related

  1. formatarNumeroBr(Double numero)
  2. formataValor(Double valor)
  3. formatBytes(final long bytes)
  4. formatBytes(long byteCount, Locale locale)
  5. formatBytesForDisplay(long amount)
  6. formatDate(Calendar cal, String format)
  7. formatDate(Date date, String format)
  8. formatDate(Date date, String format)
  9. formatDate(Date date, String format, String localeText)