How to make two ArrayList have seperate changes?
<p>I have two ArrayLists,</p>

<pre><code>ArrayList&lt;Item&gt; array1 = new ArrayList&lt;&gt;();
// and
ArrayList&lt;Item&gt; array2 = new ArrayList&lt;&gt;();
</code></pre>

<p>in Item class I also have default <code>boolean check = false;</code></p>

<p>I do checking, before everything I clean <code>array2.clear()</code> and required one from array1 add to array2:</p>

<pre><code>array2.clear();
for (Item i : array1) {
        if (.....) {
                array2.add(i);
        }
}
</code></pre>

<p>If in array2 <code>boolean check</code> is changed from <code>false</code> to <code>true</code> it is also changed in array1. How do I keep them separate so next time I add elements to array2 boolean check wouldn't copy as <code>true</code>?</p>