title: How expensive is downcasting in Java 6?
body: <p>There is a method which receives an argument of type <code>Collection</code> and it needs to use some of the methods that are found in the <code>List</code> class when it does work with that argument. Is up-casting expensive in terms of speed?</p>
  
  <pre><code>List&lt;Stuff&gt; list = (List&lt;Stuff&gt;) collection;
  </code></pre>
  
  <p>I would also like to note that the <code>collection</code> object is never used after this, only the <code>list</code>, and that this will be compiled and run on Oracle Java 1.6.</p>