You could use the java.text.DecimalFormat class
Documentation attached, sample code found below..
/**
*
* formats a double
*
* @author Kristoffer Hell
*
*/
import java.text.*;
public class DoubleFormatExample {
public static void main (String args[]) {
double dbl = 21345.099876;
System.out.println("as double: " + dbl);
DecimalFormat df = new
DecimalFormat("##########.0");
String fDec = df.format(dbl);
System.out.println(fDec);
}
}