You could either cast the double to an int:
double i = 2.0
int i2 = (int) i;
or, you could round the number to the nearest whole number, then cast it to an int, just in case you would like to round:
double i = 2.2
int i2 = (int) Math.round(i);
or, you could use
double i = 2.0
int i2 = Integer.parseInt(String.valueOf(i));
About best, though, the first option would be best for the least code, and the second would be better if you would like to get the closest integer to the double.