title: Compare two array-list element and get un-common element
body: <ul>
  <li><p>I have done something like this :</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      ArrayList&lt;String&gt; al = new ArrayList&lt;String&gt;();
      ArrayList&lt;String&gt; a2 = new ArrayList&lt;String&gt;();
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          al.add("C");
          al.add("A");
          al.add("E");
          al.add("B");
          al.add("D");
          al.add("F");
  
          a2.add("C");
          a2.add("C");
          a2.add("E");
          a2.add("B");
          a2.add("D");
          a2.add("F");
  
  
          for (int i = 0; i &lt; al.size(); i++) {
              for (int j = 0; j &lt; a2.size(); j++) {
  
                  if (al.get(i).equals(a2.get(j))) {
                      a2.remove(j);
                      Log.e("array 2 ", a2.toString());
                      break;
                  }
  
              }
          }
       } 
    }
  </code></pre></li>
  </ul>
  
  <p>-- But my output is like this :</p>
  
  <pre><code>[C, E, B, D, F]
  [C, B, D, F]
  [C, D, F]
  [C, F]
  [C]
  </code></pre>
  
  <p>-- i am having same elements in arraylist 2, then also i am getting 'C', it should be null .i.e zero un-common value.</p>