Java: 保留两位数字 123DecimalFormat df = new DecimalFormat("#.00"); var test = Double.parseDouble(df.format(100232.5693563)); System.out.println(test);