title: Doubly Linked List Search Method
body: <p>Working on a search method for my doubly linked list. I'm getting exceptions but I can't seem to figure out how to traverse the list without getting them..</p>
  
  <pre><code>    public void searchEntryNode() {
      System.out.println("I'll search through each entry to pull up what you're looking for ");
      System.out.println("Type in what you want ");
      String searchEntry = keyboard.next();
  
      EntryNode n = head;
      while (head != null) {
          if (head.getFirstName().contains(searchEntry) || head.getLastName().contains(searchEntry) || head.getPhoneNum().contains(searchEntry) || head.getEmail().contains(searchEntry)) { 
              System.out.println("Found a matching entry");
              System.out.println(n.getFirstName() + " " + n.getLastName() + " " + n.getEmail() + " " + n.getPhoneNum());
          }
  
          if (head.getNext() != null) {
              head = head.getNext();
          }   
          else {
                  System.out.println("That's all we found ");
                  System.out.println();
                  menu();
          }
      }
  }
  </code></pre>