- #1
- 5,658
- 1,560
When you take the absolute value of an integer value:
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html#abs(int)
Wondering if anyone can explain what abs does that makes it fail on the minimum integer value
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html#abs(int)
Note that if the argument is equal to the value of Integer.MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.
Wondering if anyone can explain what abs does that makes it fail on the minimum integer value
Last edited by a moderator: