DecimalFormat df = new DecimalFormat("0");
Double d = new Double("4.99958333E7");
System.out.println(df.format(d));
本文介绍了一种使用DecimalFormat类来格式化输出Double类型数值的方法。通过实例演示了如何将一个Double类型的数值按照指定格式输出。
DecimalFormat df = new DecimalFormat("0");
Double d = new Double("4.99958333E7");
System.out.println(df.format(d));

被折叠的 条评论
为什么被折叠?