It is stupid that java underflows when it reaches the boundries of some primities types.
For example:
int i = Integer.MAX_VALUE + 1;
goes back to the lowest possible int which is also a negative number!
They probably could design it differently as some other languages have this. So be ware of this specially in loops!