title: Remove Strings with same characters in a String Array
body: <p>I'm facing a problem right now. In one of my program, I need to remove strings with same characters from an Array. For eg. suppose,</p>
  
  <p>I have 3 Arrays like,</p>
  
  <pre><code>String[] name1 = {"amy", "jose", "jeremy", "alice", "patrick"};
  String[] name2 = {"alan", "may", "jeremy", "helen", "alexi"};
  String[] name3 = {"adel", "aron", "amy", "james", "yam"};
  </code></pre>
  
  <p>As you can see, there is a String <code>amy</code> in the <code>name1</code> array. Also, I have strings like <code>may</code>, <code>amy</code> and <code>yam</code> in the next two arrays. What I need is that, I need a final array which does not contain these repeated Strings. I just need only one occurrence: I need to remove all permutations of a name in the final array. That is the final array should be:</p>
  
  <pre><code>String[] finalArray={"amy", "jose", "alice", "patrick","alan", "jeremy", "helen", "alexi","adel", "aron", "james"}
  </code></pre>
  
  <p>(The above array removed both yam, may, and only includes amy). </p>
  
  <p>What i have tried so far, using <code>HashSet</code>, is as below</p>
  
  <pre><code>String[] name1 = {"Amy", "Jose", "Jeremy", "Alice", "Patrick"};
  String[] name2 = {"Alan", "mAy", "Jeremy", "Helen", "Alexi"};
  String[] name3 = {"Adel", "Aaron", "Amy", "James", "Alice"};
  Set&lt;String&gt; letter = new HashSet&lt;String&gt;();
  for (int i = 0; i &lt; name1.length; i++) {
      letter.add(name1[i]);
  }
  for (int j = 0; j &lt; name2.length; j++) {
      letter.add(name2[j]);
  }
  for (int k = 0; k &lt; name3.length; k++) {
      letter.add(name3[k]);
  }
  System.out.println(letter.size() + " letters must be sent to: " + letter);
  </code></pre>
  
  <p>But, the problem with this code is that, it just removes multiple occurences of the same string. Is there any other alternative? Any help is very much appreciated.</p>