MathHelper.multiplyExact

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

@param x the first value @param y the second value @return the result @throws ArithmeticException if the result overflows an int

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

Meta