title: Compare two Arrays and remove duplicates from Original Array java(no lists)
body: <p>So I am trying to compare two char arrays, and all letters that are present in keyW, should be removed from the array invAlphabet. I have been able to find the duplicates inside the invAlphabet array, however, I don't know how to remove the duplicate elements without using Lists or Collections which I should not use...
  Any idea?</p>
  
  <pre><code>public static void main(String[] args)
  {
      final int SIZE = 26;
      char[] keyW = {'A', 'L','O'};
  
      char[] invAlphabet = new char [SIZE];
  
  
      for (int i = 0; i &lt; SIZE; i++)
      {
          invAlphabet[i] = (char)('Z' - i);
  
      }
  
  
  
      for (int i = 0; i&lt;keyW.length; i++)
      {
          for (int j = 0; j &lt; invAlphabet.length; j++)
          {
              if(keyW[i] == invAlphabet[j])
              {
                  //need to delete the invAlphabet[j] elements that are duplicates
                  System.out.println(invAlphabet[j]);
                  System.out.println(j);
                  break;
  
              }
  
          }
      }
  
  }
  </code></pre>