title: ArrayList prints multipe times
body: <p>My problem is that when I run this code, everything in the ArrayList is printed about 3 times.</p>
  
  <p>Here is the code you will need to see:</p>
  
  <pre><code>static ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
  static HashMap&lt;String, Character&gt; books = new HashMap&lt;String, 
  Character&gt;();
  
  public static void main(String[] args){
  //      Title, Section
  books.put("Harry Potter and the blank blank blank", 'A');
  books.put("Harry Potter and the blank", 'Z');
  books.put("Harry Potter ", 'Z');
  books.put("Harry Potter and the blank blank", 'L');
  findBook("Harry");
  }
  
  public static void findBook(String title){
  list.clear();
  for (String key : books.keySet()) {
    if(key.equalsIgnoreCase(title)){
      System.out.println(books.get(key));
    }
    else if (key.startsWith(title)) {
      list.add(key);
    }else System.out.println("Book not found");
      for(String bookTitle : list){
        System.out.println("Book: " + bookTitle);
    }
  }
  </code></pre>
  
  <p>Please help, thank you so much!
  -S1ant</p>