math abs function code example
Example 1: finding absolute value in java
import java.lang.Math;
int sum,x=-5;
sum = Math.abs(x);
Example 2: javascript math absolute
Math.abs(-7.25); // returns 7.25
import java.lang.Math;
int sum,x=-5;
sum = Math.abs(x);
Math.abs(-7.25); // returns 7.25