title: JAVA Linked List Search Linked List to compare data with user inputted data?
body: <p>I have a linked list. Everything is going great inside of it. My only problem is how do I compare a variable to the contents to see if their is a match. </p>
  
  <p>For instance I have a linked list full of names. I want the user to be able to enter a name in and search to see if that name exists in the Linked List.</p>
  
  <p>User enters: Johnny</p>
  
  <p>Program checks if Johnny is present in Linked List. </p>
  
  <p>I don't have the code for this as I am not sure of what it would be.</p>
  
  <pre><code>public static LinkedList&lt;String&gt; NameList1 = new LinkedList&lt;String&gt;(); // How do I search its contents?
  </code></pre>
  
  <p>THANKS SO MUCH!!</p>