Here you can find the source of formatDouble(Number value)
public static String formatDouble(Number value)
//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); } }