How to remove duplicates from a list
<p>I have a list that contain elements, I want to remove the duplicates. I have tried to do that but it didn't work.</p>

<p>This is the code :</p>

<pre><code>//list is the original list containing duplicates
Iterator it1=list.iterator();//iterator1 
 while (it1.hasNext())
  {
    Iterator it2=list.iterator(); //iterator2
    if(it1.next().equals(it2.next()))
     {
       //liststeps is the list without duplicates
       liststeps.add(it1.next());
     }
  } 
System.out.println("multiple list  "+list.toString());
System.out.println("list  "+liststeps.toString()); 
</code></pre>

<p><strong>Results:</strong></p>

<pre><code>multiple list  [Open, In Progress, Waiting Customer Test, Closed, Open, Step11, Step22,  Open, In Progress, Waiting Customer Test, Closed]
list  [In Progress, Step11, In Progress]
</code></pre>
