Sep 19, 2018

Java - abs() Method gives the absolute value of the argument.

 System.out.println(Math.abs(a));


The argument can be int, float, long, double, short, byte.