Math.abs() Math absolute

Returns absolute value of the input number
	System.out.println(Math.abs(-20));   // 20
	System.out.println(Math.abs(-20.56));// 20.56
	System.out.println(Math.abs(20));    // 20
	System.out.println(Math.abs(20.56)); // 20.56
The negative sign is removed and only number is returned.
Input can be a double, float, integer or long number. The output data type will be same as input data type.

All Math functions


plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer