title: Searching content of a file
body: <p>I dont have alot of experience working with files. I have a file. I have written the following to the file</p>
  
  <pre><code>Test 112
  help 456
  news 456
  Friendly 554
  </code></pre>
  
  <blockquote>
    <p>fileOUT.write("Test 112\r\n");//this is a example of how I entered the data.</p>
  </blockquote>
  
  <p>Now I am trying to search in the file for the word news and display all the content that is in that line that contains the word <code>news</code>.</p>
  
  <p>This is what I have attempted.</p>
  
  <pre><code>if(fileIN.next().contains("news")){
      System.out.println("kkk");
  }
  </code></pre>
  
  <p>This does not work. The folowing does find a word news because it displays KKK but I dont have an Idea how to display only the line that it news was found in. </p>
  
  <pre><code>while(fileIN.hasNext()){
                      if(fileIN.next().contains("Play")){
                          System.out.println("kkk");
  
                      }
                  }
  </code></pre>
  
  <p>What must be displayed is <code>news 456</code>.
  Thank You</p>