public static long multiplyExact (long x, long y)

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

Parameters:
x    the first value
y    the second value

Returns:  the result

Exceptions:
ArithmeticException    if the result overflows a long

See also:
Math.multiplyExact(long,long)

Since:  1.8