Returns the nearest integer after rounding up .
Math.round(double input_number)
Output is a rounded value.
	System.out.println(Math.round(12.34)); //12
	System.out.println(Math.round(12.67)); //13
	System.out.println(Math.round(12));    //12
	System.out.println(Math.round(-12.34)); //-12
	System.out.println(Math.round(-12.67)); //-13
	System.out.println(Math.round(-12));    //-12
Using double
	double my_data=Math.round(12.34);
	System.out.println(my_data); //12.0

All Math functions

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 All rights reserved worldwide Privacy Policy Disclaimer