Java: why does multiplying large positive number cause negative results? [duplicate]
问题 This question already has answers here : why Integer.MAX_VALUE + 1 == Integer.MIN_VALUE? (8 answers) Closed 1 year ago . I’m seeing some strange behavior multiplying integers with Java. I was doing some coding exercises and came upon the following fizz buzz type of exercise. The requirements: Given an integer, write a function that finds the product of every multiple of 3 which is smaller than the given integer, except any multiple of 5. Eg, given 17 we want to return 12*9*6*3 (= 1944). I