This week's book giveaway is in the Servlets forum. We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line! See this thread for details.

There is no OverflowException in the Java API. Java integer arithmetic does not produce overflows, I just quietly wraps around.

In your example, Integer.MIN_VALUE == -(2^31). In binary that value is

1000 0000 0000 0000 0000 0000 0000 0000

When a value is the operand of the unary minus operator, you just need to compute it�s two�s complement: change all ones to zeros, all zeros to ones, add one to that result, and ignore the carry that goes out of the 32nd bit. If you do this with the above value, you get the same value you started with.