DecimalFormat df=new DecimalFormat("#.##"); String a=df.format(111.224567); System.out.println(a);
结果是111.22