Pages

Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Thursday, December 2, 2021

Java Absolute Value - Math.abs()

1. Overview

In this tutorial, We'll learn how to get the absolute value for the given number in java
Java API has the handy Math utility class to work with arithmetic and mathematical operations.



Math.abs() method take the number and return the absolute value for the given value. Absolute value means the positive number for the given number. Here, a given number can be a positive value or negative value or zero.

Math.abs() is used to get the positive number for the given value.

Java Absolute Value - Math.abs()