title: Trying to compare each element of two different ArrayLists
body: <p>So I need to compare two different ArrayLists elements. If the element from the first ArrayList(tweets) does not match any from the second(hashTags) I want to add the element(from tweets) to the second ArrayList(hashTags)</p>
  
  <p>Here is my code thus far:</p>
  
  <pre><code>package edu.bsu.cs121.albeaver;
  
  import java.util.*;
  
  public class HashTagCounter {
      public static void main(String args[]) {
          System.out
                  .println("Please tweet your tweets,and type 'done' when  you are done.");
          Scanner twitterInput = new Scanner(System.in);
  
          ArrayList&lt;String&gt; tweets = new ArrayList&lt;String&gt;();
          ArrayList&lt;String&gt; hashTags = new ArrayList&lt;String&gt;();
  
          while (true) {
              String tweet = twitterInput.next();
              tweets.add(tweet);
              if ("done".equals(tweet))
                  break;
          }
  
          System.out.println(tweets);
          twitterInput.close();
          int count = 0;
  
          for (String tweet : tweets) {
              if (tweet.contains("#") &amp;&amp; count == 0) {
                  hashTags.add(tweet);
                  hashTags.add(1, "");
                  count++;
              } else if (tweet.contains("#")) {
                  for (String hashTagged : hashTags) {
                      if (tweet.equalsIgnoreCase(hashTagged) != true) {
                          hashTags.add(hashTagged);
                      }
                  }
              }
          }
  
          System.out.println(hashTags);
          System.out.println("Number of unique '#' used is: "
                  + (hashTags.size() - 1));
  
      }
  }
  </code></pre>
  
  <p>(edit)I seem to get a 'java.util.ConcurrentModificationException'  error.
  Thank you for any and all help:)</p>