Programs must not allow mathematical operations to exceed the integer ranges provided by their primitive integer data types. According to the Java Language Specification (JLS), §4.2.2, “Integer Operations” [JLS 2005]:
The built-in integer operators do not indicate overflow or underflow in any way. Integer operators can throw a
NullPointerException if unboxing conversion of a
null reference is required. Other than that, the only ...