title: removing item from arraylist java
body: <p>I am trying to compare weather an item is contained within the arrayList and if it is then remove it. Im not sure weather I have to implement my own equals method or not, this is my code but it isn't working to remove the correct item.</p>
  
  <pre><code>  public boolean removeItem(Item item) {
  
      for(int i = 0; i &lt; items.size(); i++) {
  
          if (items.get(i).equals(item)) {
              items.remove(item);
              return true;
          } 
  
  
      }
      return false;
  }
  </code></pre>