Java BigInteger abs() Method

The abs() method of Java BigInteger class returns a BigInteger whose value is the absolute value of this BigInteger. This method is very useful if we are dealing only with unsigned integer.

Syntax:

Parameter:

NA

Returns:

This method returns the absolute value of the called value i.e. abs(this).

Example

Test it Now

Output:

Absolute value of  345 is 345
Absolute value of  -345 is 345

Next TopicJava BigInteger




Latest Courses