MathHelper.multiplyExact

Returns the product of the arguments, throwing an exception if the result overflows a {@code long}.

@param x the first value @param y the second value @return the result @throws ArithmeticException if the result overflows a long

  1. int multiplyExact(int x, int y)
  2. long multiplyExact(long x, int y)
  3. long multiplyExact(long x, long y)
    class MathHelper
    static
    long
    multiplyExact
    (
    long x
    ,
    long y
    )

Meta