MathHelper.negateExact

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

@param a the value to negate @return the result @throws ArithmeticException if the result overflows an int

  1. int negateExact(int a)
    class MathHelper
    static
    int
    negateExact
    (
    int a
    )
  2. long negateExact(long a)

Meta