+ 2
How can i convert from double to int? [SOLVED]
2 Answers
+ 6
1. Java â double to int conversion using type casting
double dnum = 99.99;
int inum=(int)dnum;
2. Java â Convert double to int using Math.round()
double dnum = 99.99;
int inum=(int) Math.round(dnum);
3. Convert double to int in Java using Double.intValue()
Double dnum = 99.99;
int inum = dnum.intValue();
+ 1
Thank you ;)