abs()

Returns the absolute value of a number.

Syntax

Numeric abs()

Usage

  • If the value is not negative, the value is returned.
  • If the value is negative, the negation of the value is returned.
  • If the value is equal to the value of Integer. MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.