title: Remove duplicate elements in an ArrayList without using HashSet
body: <p>My logic is messed up. I am just trying to work out a way to remove duplicates in an ArrayList without using a HashSet.</p>
  
  <pre><code>public static void main(String[] args) {
      ArrayList&lt;String&gt; wordDulicate = new ArrayList&lt;String&gt;();
      wordDulicate.add("Tom");
      wordDulicate.add("Jones");
      wordDulicate.add("Sam");
      wordDulicate.add("Jamie");
      wordDulicate.add("Robie");
      wordDulicate.add("Helen");
      wordDulicate.add("Tom");
      wordDulicate.add("Troy");
      wordDulicate.add("Mika");
      wordDulicate.add("Tom");
  
      for (String dupWord : wordDulicate) {
          if (wordDulicate.equals(dupWord))
              System.out.println(wordDulicate.get(dupWord));
      }
  }
  </code></pre>