title: removeAll() is not removing objects
body: <p>I have two Array list of self created class's objects.After comparison I am removing common objects from both and have prepared method for getting common elements.After finding common elements I remove common elements by calling removeAll() method but it is not removing that elements.I have used this method before but never got htis type of error.Here is my code :</p>
  
  <pre><code>public void SynchphoneBookwithDB() {
      //phone contacts
      ArrayList &lt; Contacts &gt; phone_contacts = CommonUtility.getAllContacts(ctx);
      Log.e("SynchphoneBookwithDb", "phonebooksize" + phone_contacts.size());
      //get data base contacts 
      ArrayList &lt; Contacts &gt; db_contacts = UserService.getUserServiceInstance(ctx).getNameNumberIdIsmycontactIsBlockedFromContatcsTable();
      Log.e("SynchphoneBookwithDb", "DBSIZE" + db_contacts.size());
      //get common contacts
      ArrayList &lt; Contacts &gt; common_contacts = getCommonContacts(phone_contacts, db_contacts, false);
      Log.e("SynchphoneBookwithDb", "common_contacts" + common_contacts.size());
      //not operation on common numbers so remove them 
      phone_contacts.removeAll(common_contacts);
      db_contacts.removeAll(common_contacts);
  
      //remained in phone must be added to db 
      Log.e("SynchphoneBookwithDb", "afetr removing contacts phonebooksize" + phone_contacts.size());
  
      Log.e("SynchphoneBookwithDb", "after removing contacts DBSIZE" + db_contacts.size());
  
  }
  </code></pre>
  
  <p>Here is my method for getting common elements:</p>
  
  <pre><code>public ArrayList &lt; Contacts &gt; getCommonContacts(ArrayList &lt; Contacts &gt; referenced, ArrayList &lt; Contacts &gt; other, Boolean insertInDb) {
      //       Log.d("Inside common contacts","start"); 
      ArrayList &lt; Contacts &gt; commonArrayList = new ArrayList &lt; Contacts &gt; ();
      int count_ref = referenced.size();
  
      for (int i = 0; i &lt; count_ref; i++) {
          int count_other = other.size();
          for (int j = 0; j &lt; count_other; j++) {
              if (referenced.get(i).getNumber().equals(other.get(j).getNumber())) {
                  commonArrayList.add(other.get(j));
                  if (insertInDb) { //insert from server as it is 
                      other.get(j).setIsmycontact(true);
                      long k = UserService.getUserServiceInstance(ctx).addInContatcs(other.get(j));
                  }
  
              }
          }
      }
  
      return commonArrayList;
  }
  </code></pre>