Why does System.out.println(404 / 10 * 10 + 1)
equal 401 rather than 405?
Asked
Active
Viewed 677 times
0

DreaM
- 11
- 2
-
5`404 / 10` is a integer division, meaning result is 40 ... multiply by 10, add 1, you got 401 – Lutzi May 14 '18 at 20:28
-
The second dupe is a dupe of the first dupe :-D – achAmháin May 14 '18 at 20:41