title: Casting a double result from a divison into an int in Java
body: <p>I want to use a method that requires an <em>int</em>. This <em>int</em> is determined by a division potentially solved as a <em>double</em>. I need to perform this as neat and short as possible and I am wondering if I can count that the method will take the <em>double</em> directly casted as <em>int</em> and if this means a single truncation with no roundings.</p>
  
  <p>Do I have to necessarily use <em>Math</em> static methods?<br/>
  Could this give errors for non <em>int</em> parameter entries to <em>subList</em>?<br/>
  Could someone provide any guidance about this?<br/></p>
  
  <pre><code>List&lt;Integer&gt; b = null;
  List&lt;Integer&gt; c = null;
  int size = a.size();
  
  b.addAll(a.subList(0, size / 2)); // To hold the first half
  c.addAll(a.subList(size / 2, size)); // To hold the second half [and excess]
  </code></pre>
  
  <p>Thank you in advance for your help.</p>