| Author |
Math.abs()
|
Jiji Cherian
Greenhorn
Joined: Apr 15, 2005
Posts: 14
|
|
Hi there. This is a question related to Math.abs(). Why Math.abs(Integer.MIN_VALUE)and Math.abs(Long.MIN_VALUE)returns -ve value. Looking forward for your valuable answers?? Thanks in advance..
|
Rgds.<br /> <a href="mailto:mr.jiji@gmail.com" rel="nofollow">mr.jiji@gmail.com</a>
|
 |
Joyce Lee
Ranch Hand
Joined: Jul 11, 2003
Posts: 1392
|
|
Hi Jiji, The negation of Integer.MIN_VALUE (-2147483648) will result in overflow since the range for int is -2147483648 to 2147483647. Same for long. Joyce
|
 |
 |
|
|
subject: Math.abs()
|
|
|