title: ClassCastException, casting Integer to Double
body: <pre><code>ArrayList marks = new ArrayList();
  Double sum = 0.0;
  sum = ((Double)marks.get(i));
  </code></pre>
  
  <p>Everytime I try to run my program, I get a ClassCastException that states: java.lang.Integer cannot be cast to java.lang.Double</p>