java tutorial - Java Math.abs() Method - tutorial java - java programming - learn java - java basics - java for beginners
Learn Java - Java tutorial - Java numbers abs - Java examples - Javaprograms
Description
Method Math.abs () - gives the absolute value of the argument, in simple words - we get the modulus of a number. The argument can be int, float, long, double, short, byte.
Syntax
Variants of the method are given below:
Options
Detailed information about the parameters:
- Any primitive data type.
Return value
- In Java, Math.abs () returns the absolute value of the argument (the number module).