Javatpoint Logo
Javatpoint Logo

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





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA