This is due to the fact that the data type is intinsufficient to accept all this value.
Convert it to long.
product = (9L * 9 * 9 * 9 * 9 * 9 * 9 * 9 * 9 * 9 * 9 * 9 * 9);
Or at least drop it first. But make sure you get the data type value long. Otherwise, it will not work, and you will never get such a result. What did you want:)
source
share