SyntaxFix
Write A Post
Hire A Developer
Questions
3.545555555 to get 3.54. Try Following for this:
DecimalFormat df = new DecimalFormat("#.##"); df.setRoundingMode(RoundingMode.FLOOR); double result = new Double(df.format(3.545555555);
This will give= 3.54!