DecimalFormat df=new DecimalFormat("#.##");
String a=df.format(111.224567);
System.out.println(a);
结果是111.22
DecimalFormat df=new DecimalFormat("#.##");
String a=df.format(111.224567);
System.out.println(a);
结果是111.22
转载于:https://www.cnblogs.com/beicheng/p/4178415.html