Use java.text.NumberFormat.You'll want to do something like:NumberFormat nf = NumberFormat.getNumberInstance();nf.setMaximumFractionDigits(1);and then do nf.format(yourdouble)