Java Math.abs() methodThe java.lang.Math.abs() method returns the absolute (Positive) value of a int value. This method gives the absolute value of the argument. The argument can be int, double, long and float. Syntax:Parameters:Return:
Example 1:Test it NowOutput: 78 48 -2147483648 Example 2:Test it NowOutput: 47.63 894.37 Infinity Example 3:Test it NowOutput: 73.02 428.0 Example 4:Test it NowOutput: 78730343 4839233 -9223372036854775808 Next TopicJava Math |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India