how to make a separated copy of an ArrayList
<blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="http://stackoverflow.com/questions/715650/java-how-to-clone-arraylist-but-also-clone-its-items">Java: how to clone ArrayList but also clone its items?</a>  </p>
</blockquote>

<p>I have a sample program like the following:</p>

<p>ArrayList orginalInvoice = new ArrayList();</p>

<p>//add some items into it here</p>

<p>ArrayList copiedInvoice = new ArrayList();</p>

<p>copiedInvoice.addAll(orginalInvoice);</p>

<p>I thought I can modify items inside the copiedInvoice and it will not affect these itmes inside originalInoice. But I am wrong. </p>

<p>How can I make a separated copy of an ArrayList? clone?
thanks,</p>
