Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double value=0.14499999970197677;
- double rounded;
- rounded=Math.round( value* 1000.0) / 1000.0;
- rounded=Math.round( rounded* 100.0) / 100.0;
- System.out.println("Final value :" + rounded);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement