格式System.out.print(String.format("%.保留几位f",对象));
例子
System.out.print(String.format("%.1f",tem1) + " " + String.format("%.1f",tem2));
格式System.out.print(String.format("%.保留几位f",对象));
例子
System.out.print(String.format("%.1f",tem1) + " " + String.format("%.1f",tem2));