Java Floating Point Division
Which of the following Java statements correctly performs floating-point division to produce a precise decimal result?
A
Math.abs(14 / 5);
B
int chocAmount = 14 / 5;
C
Math.pow(14, 5);
D
double chocAmount = 14.0 / 5.0;
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | kaisuki | 1 | 1 | 0m 00s | 100 |
| #2 | Potter16 | 1 | 1 | 0m 07s | 93 |
| #3 | chunxiangxu.cxu | 1 | 1 | 0m 11s | 89 |
| #4 | lsj08030922 | 1 | 1 | 0m 22s | 78 |
| #5 | bommasam000 | 1 | 1 | 1m 24s | 16 |
| #6 | liuwilliam072410 | 1 | 1 | 2m 03s | -23 |
| #7 | zgj07310417 | 0 | 2 | 0m 41s | -61 |
| #8 | richa.tuli | 0 | 2 | 1m 08s | -88 |
Items per page:
10
1 – 8 of 8
