使用 DecimalFormat ,保留小数点后两位. public static String format2(double value) { DecimalFormat df = new DecimalFormat("0.00"); df.
確定! 回上一頁