Quick question, What is the best way to convert an primitive data type double to a primitive data type int. Currently I am using the following code but it seems to be a lot of methods to do a simple task.
double i = 2.0;
int i2 = Integer.parseInt(Double.toString(i));