Setting a list equal to list using equal sign or copy constructor?
<p>This is a simple question but if I do</p>

<pre><code>List&lt;Object&gt; list = getObjectsFromDatabase();
</code></pre>

<p>This would not be the correct way to handle this?</p>

<p>But this would?</p>

<pre><code>List&lt;Object&gt; firstList = getObjectsFromDatabase();

List&lt;Object&gt; list = new ArrayList&lt;Object&gt;(firstList);
</code></pre>

<p>Or if I had a class</p>

<pre><code>public class ReportDisplayModel&lt;T&gt; {

    public ReportDisplayModel(List&lt;T&gt; data) {
        this.data = data;
    }
    public List&lt;T&gt; data;
}
</code></pre>

<p>And I wanted to set the data in this model I would use the constructor?</p>

<pre><code>ReportDisplayModel&lt;Object&gt; model = new ReportDisplayModel&lt;Object&gt;(getData());
</code></pre>

<p>Instead of </p>

<pre><code>ReportDisplayModel&lt;Object&gt; model = new ReportDisplayModel&lt;Object&gt;();

model.data = getData();
</code></pre>

<p>Just need a clarification.  Thanks.</p>
