title: Storing an Object into a temporary Object and not changing the original Objects value
body: <p>I have an object stored in a global variable let's say:</p>
  
  <pre><code>static ArrayList&lt;Object&gt; list = new ArrayList&lt;Object&gt;();
  </code></pre>
  
  <p>I want to store it later to look into it without actually changing the values in the structure itself. So I am doing something similar to this:</p>
  
  <pre><code>public void someMethod()
  {
       ArrayList&lt;Object&gt; tempList = new ArrayList&lt;Object&gt;();
       tempList = list;
       list.remove(0);
  }
  </code></pre>
  
  <p>I'm thinking this may have something to do with me initializing the variable as "static".  I don't usually do that but Eclipse told me I had to so I just let the change happen.  </p>
  
  <p>My understanding would be that I am storing the original list into a temporary list and anything I do to the temporary list would be independent of the original list.  But it appears that if I were to remove something from this above list, that the original list is removing it as well.  </p>
  
  <p>I remember learning that this could happen sometimes but I think I've done this before without having that issue.</p>
  
  <p>I apologize if this is a repeated question but the way I worded it didn't show me an question that was similar.</p>
  
  <p>Thanks!</p>