title: Enhanced for loop to remove objects from ArrayList
body: <p>I have two ArrayLists from a Parse Query that I am comparing with an enhanced for loop. I want to check to see if there is a matching ObjectId in the 2 Lists, if so, I want to remove that Object from "allDropList". All other components are working properly, I believe the problem to be with my enhanced for loop syntax. Here is my code, thanks! Note: I have experimented with "if" and "while", with no success.</p>
  
  <pre><code>public ArrayList&lt;DropItem&gt; filterDrops(ArrayList &lt;DropItem&gt; hasRelationList , ArrayList &lt;DropItem&gt; allDropsList){
  
      for(DropItem dropItemAll : allDropsList) {
  
          for(DropItem dropItemRelation  : hasRelationList) {
  
             /*if*/ while(dropItemAll.getObjectId().equals(dropItemRelation.getObjectId())) {
                    allDropsList.remove(dropItemAll);
              }
          }
      }
      return allDropsList;
  }
  </code></pre>