MathHelper.incrementExact

Returns the argument incremented by one, throwing an exception if the result overflows a {@code long}.

@param a the value to increment @return the result @throws ArithmeticException if the result overflows a long

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

Meta