Here you can find the source of doubleFormat(double d)
public static String doubleFormat(double d)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; public class Main { public static String doubleFormat(double d) { DecimalFormat df = new DecimalFormat("#########.###"); return df.format(d); }//from w ww . jav a2s.c om }