Java math.BigDecimal.abs() method

The java.math.BigDecimal.add() method is used to find out the absolute value of any number.

abs() method does not take any parameter.

Syntax

Example 1

Test it Now

Output:

Abs is=40

Example 2

Test it Now

Output:

Enter first number:
-40
Abs is=40

Next TopicJava Math




Latest Courses