Java Locale Format formatDouble(Number value)

Here you can find the source of formatDouble(Number value)

Description

format Double

License

Apache License

Declaration

public static String formatDouble(Number value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

import java.util.Locale;

public class Main {
    private static final DecimalFormat doubleFormat = new DecimalFormat("###,###,###.###########",
            DecimalFormatSymbols.getInstance(Locale.GERMANY));

    public static String formatDouble(Number value) {
        if (value == null) {
            return "0";
        }//from www. j  av  a 2 s.com
        return doubleFormat.format(value);
    }
}

Related

  1. formatDouble(Double valor, int decimal)
  2. formatDouble(double value)
  3. formatDouble(double value)
  4. formatDouble(final Double value)
  5. formatDouble(Locale locale, double value)
  6. formatDouble(String pattern, double value)
  7. formatDoubleToCSV(double d)
  8. formatDuration(long nanoTime)
  9. formatedDate(Date date)