title: Inserting one list into another list in java?
body: <p>I have the below java code:</p>
  <pre><code>List&lt;SomePojo&gt; list = new ArrayList&lt;SomePojo&gt;();
  //add 100 SomePojo objects to list.
  </code></pre>
  <p>Now list has 100 objects.</p>
  <p>If I create one more instance as below:</p>
  <pre><code>List&lt;SomePojo&gt; anotherList = new ArrayList&lt;SomePojo&gt;();
  anotherList.addAll(list);
  </code></pre>
  <p>Now, how many objects will be in memory: 100 or 200 objects?</p>
  <p>In the line below, are objects being added or only references?</p>
  <pre><code>anotherList.addAll(list);
  </code></pre>
  <p>If I make any change to <code>list</code>, do the same changes reflect to <code>anotherList</code> and vice-versa?</p>