📅  最后修改于: 2022-03-11 14:52:38.593000             🧑  作者: Mango
double input = 3.14159265359;
System.out.format("double : %.2f", input); // 3.14
System.out.println("double : " + String.format("%.2f", input)); // 3.14