This is a special case in the implementation of the
abs() method of
Java 2 API. Check-out the Math class, methods and the abs
method which takes the int argument. I am pasting it here ....
abs
public static int abs(int a)
Returns the absolute value of an int value. If the argument is
not negative, the argument is returned. If the argument is
negative, the negation of the argument is returned.
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.
Parameters:
a - an int value.
Returns:
the absolute value of the argument.
See Also:
Integer.MIN_VALUE One reason why I like Java...every little detail seems to be
taken care of...don't you think?
regds.
- satya
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81