Here is my code :
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(14);
nf.setMinimumFractionDigits(0);
double d = 0;
System.out.println(nf.format(d));
With Android SDK : it prints "0.00000000000001" With Java SDK (j2SE) : it prints "0"
Why this difference ? bug in NumberFormat class for Android SDK ?