title: Find a string (or a line) in a txt File Java
body: <p>let's say I have a txt file containing:</p>
  
  <pre><code>john
  dani
  zack
  </code></pre>
  
  <p>the user will input a string, for example "omar"
  I want the program to search that txt file for the String "omar", if it doesn't exist, simply display "doesn't exist".</p>
  
  <p>I tried the function String.endsWith() or String.startsWith(), but that of course displays "doesn't exist" 3 times.</p>
  
  <p>I started java only 3 weeks ago, so I am a total newbie...please bear with me.
  thank you.</p>