Java tutorial
//package com.java2s; import java.text.DecimalFormat; import java.text.NumberFormat; public class Main { public static String doubleToString(double value) { NumberFormat formatter = new DecimalFormat("0.##"); return formatter.format(value); } }