title: Removing Duplicate Values from ArrayList
body: <p>I have one Arraylist of String and I have added Some Duplicate Value in that. and i just wanna remove that Duplicate value So how to remove it. </p>
  
  <p>Here Example I got one Idea.</p>
  
  <pre><code>List&lt;String&gt; list = new ArrayList&lt;String&gt;();
          list.add("Krishna");
          list.add("Krishna");
          list.add("Kishan");
          list.add("Krishn");
          list.add("Aryan");
          list.add("Harm");
  
          System.out.println("List"+list);
  
          for (int i = 1; i &lt; list.size(); i++) {
              String a1 = list.get(i);
              String a2 = list.get(i-1);
              if (a1.equals(a2)) {
                  list.remove(a1);
              }
          }
  
          System.out.println("List after short"+list);
  </code></pre>
  
  <p>But is there any Sufficient way remove that Duplicate form list. with out using For loop ? 
  And ya i can do it by using HashSet or some other way but using array list only.
  would like to have your suggestion for that. thank you for your answer in advance.</p>