使用DecimalFormat模式指定格式設定String的模式屬性pattern: ... 的模式 7 System.out.println(df.format(1.11111)); 8 //output: 001.111 9 10 df.
確定! 回上一頁