有四種方法可以將一個雙精度數四捨五入到小數點後兩位,如 Math.round() 、 BigDecimal 使用 setScale() 方法、 DecimalFormat 和 Apache Common 庫。
確定! 回上一頁