Here you can find the source of toString(double d)
public static String toString(double d)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { public static String toString(double d) { return new DecimalFormat("#,##0.00").format(d); }//from w ww.j av a 2s . c o m }