Compare two ArrayList<String>(); and delete the different elements : <p>i wanted to compare two ArrayList arrays and delete the different elements. </p>

<pre><code>List&lt;String&gt; al1 = new ArrayList&lt;String&gt;();
List&lt;String&gt; al2 = new ArrayList&lt;String&gt;();

al1.add("222");

al2.add("222");
al2.add("333");

System.out.println(al1);
System.out.println(al2);
</code></pre>

<p>The output of println is:</p>

<pre><code>[222]
[222, 333]
</code></pre>

<p>I want to remove the 333 in the second array because it is not in the first one how can i achieve this ? </p>

<p>Thanks in advance.</p>
