Reproduce behavior MAX_VALUE and MIN_VALUE
问题 The following also applied to other MIN_VALUE and MAX_VALUE , but let's only focus on Integer for now. I know that in Java integers are 32-bit, with Integer.MAX_VALUE = 2147483647 (2 31 -1) and Integer.MIN_VALUE = -2147483648 (-2 31 ). When calculating with these values when you go beyond their bounds, the number wraps around / overflows. So when you do something like Integer.MAX_VALUE + 1 , the result is the same as Integer.MIN_VALUE . Here are some basic arithmetic calculations with MIN