Short answer
Java integer arithmetic wraps around modulo 2^32 (or 2^64) with no exception, so Integer.MAX_VALUE + 1 silently becomes Integer.MIN_VALUE.
Explanation
It is silent because the JLS defines two's-complement wraparound rather than a trap. In code that handles untrusted sizes, durations, or financial sums, use Math.addExact / multiplyExact (which throw on overflow) or widen to long, and watch for the midpoint bug (low+high)/2 in binary search.
Common mistakes
- Assuming overflow throws an exception — it silently wraps around.
- Not using Math.addExact / multiplyExact or long when values can grow.