Here you can find the source of format(double value)
public static String format(double value)
//package com.java2s; //License from project: Open Source License import java.text.NumberFormat; import java.util.*; public class Main { public static String format(double value) { return NumberFormat.getInstance(Locale.US).format(value); }/*from w ww. j ava 2s . co m*/ }