Math.abs(Integer.MIN_VALUE) returns Integer.MIN_VALUE
Java uses two's complement to represent integral values. To get the abs value of -41 we need to convert a negative value (-41) to a positive value (41). Here is how its done using two's complement. Note that I'm using a byte width for the purpose of discussion.
We see here that the abs(-41) value is 41.
Now back to your original concern using Integer.MIN_VALUE:
Hope this helps
------------------
~James Baud He who asks, is a fool for five minutes;
but, he who does not ask, remains a fool forever. (Chinese proverb)
<B>~James Baud</B><P>He who asks, is a fool for five minutes;<BR>but, he who does not ask, remains a fool forever. (Chinese proverb)