This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.

Integer.MIN_VALUE is represented in binary as 10000000000000000000000000000000. Since this is a negative number, the absolute value will be -1 * the number - The twos complement is the ones complement plus one - The ones complement will be 01111111111111111111111111111111 and when we add 1 to it, we get 10000000000000000000000000000000 (which is Integer.MIN_VALUE again!), so the problem is not that abs() cannot handle such large numbers, the problem is that ints are 32 bits.