Question about performance and optimization
<p>How inefficient is that:</p>

<pre><code>List&lt;Object&gt; getList(){
    return new LinkedList&lt;Object&gt;();
}

void foo(){
    for(Object o: getList()){
       do something with o;
    }
}
</code></pre>

<p>in compare with that:</p>

<pre><code>List&lt;Object&gt; getList(){
    return new LinkedList&lt;Object&gt;();
}

void foo(){
    List&lt;Object&gt;  os = getList();
    for(Object o: os){
       do something with o;
    }
}
</code></pre>
