title: Counting Occurrences of a word using a input/output program in java
body: <p>How would you find the most occurring words in a file that has five or more letters using an input/output program? This is a starter code that i have</p>
  
  <pre><code>import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.IOException;
  import java.util.Scanner;
  
  
  public class FileIOtest {
  
  /**
   * @param args
   * @throws FileNotFoundException 
   */
  public static void main(String[] args) throws FileNotFoundException {
      // TODO Auto-generated method stub
      File file = new File ("myfile.txt");
      Scanner inputFile = new Scanner(file);
  
      while(inputFile.hasNext())
      {
          String str =inputFile.nextLine();
          System.out.println(str);
      }
      inputFile.close();
  
  }
  
  }
  </code></pre>