public static int multiplyExact (int x, int y)

Returns the product of the arguments, throwing an exception if the result overflows an int.

Parameters:
x    the first value
y    the second value

Returns:  the result

Exceptions:
ArithmeticException    if the result overflows an int

See also:
Math.multiplyExact(int,int)

Since:  1.8