Double d1=12345678.00;
Double d2=12345678.99;
NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false);//避免长数字带逗号
String s1 = nf.format(d1);
String s2 = nf.format(d2);
System.out.println(s1);
System.out.println(s2);