1.Decimalformat df1 = new Decimalformat("####.000");
System.out.println(df1.format(1234.56));
显示:1234.560
2.Numberformat nf = Numberformat.getPercentInstance();
System.out.println(nf.format(0.47));
显示:47%
3.DecimalFormat df = new DecimalFormat("###,##0.00");
System.out.println(nf.format(24.7));
显示:24.70
System.out.println(nf.format(23123.47));
显示:123,23.47