Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. double value=0.14499999970197677;
  2. double rounded;
  3. rounded=Math.round( value* 1000.0) / 1000.0;
  4. rounded=Math.round( rounded* 100.0) / 100.0;
  5. System.out.println("Final value :" + rounded);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement