Java: Double保留指定位数小数 123 var test=30.852013; var numberFormat=new DecimalFormat("0.00"); System.out.println(numberFormat.format(test));