經安全檢測,此網站為安全網站,請放心前往原始網址!

round double to two decimal places in java - Stack Overflow

ok this is what I did to round a double to 2 decimal places, amount = roundTwoDecimals(amount); public double roundTwoDecimals(double d) { DecimalFormat twoDForm = new DecimalFormat("#.##"); ... ... Your Money class could be represented as a subclass of .

stackoverflow.com

網址安全性掃描由 google 提供