title: How do I write a generic foreach loop in Java?
body: <p>I have the following code so far:</p>
  
  <pre><code>/*
   * This method adds only the items that don’t already exist in the
   * ArrayCollection. If items were added return true, otherwise return false.
   */
  public boolean addAll(Collection&lt;? extends E&gt; toBeAdded) {
  
      // Create a flag to see if any items were added
      boolean stuffAdded = false;
  
  
      // Use a for-each loop to go through all of the items in toBeAdded
      for (something : c) {
  
          // If c is already in the ArrayCollection, continue
          if (this.contains(c)) { continue; }     
  
              // If c isn’t already in the ArrayCollection, add it
              this.add(c)
              stuffAdded = true;
          }
  
          return stuffAdded;
      }
  }
  </code></pre>
  
  <p>My question is: what do I replace something (and c) with to make this work?</p>