askIT

Android Round double

You can round a data type double with the code Math.round.

Round double

double myDouble = Math.round(inputDouble);

Round double example

double weight = 85;
double height = 185 * 1/100;
height = height*height;
double result = Math.round(weight/height);

Add comment

avatar_blank_60.png

Comment:

Name:

Email:

Comments

No comments yet. You can be the first one to comment. Just write your comment in the form and click on the submit button.