title: Converting double to int
body: <p>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.</p>
  
  <pre><code>double i = 2.0;
  int i2 = Integer.parseInt(Double.toString(i));
  </code></pre>