title: How can I read and compare numbers from a text file?
body: <p>I've a text file and eclipse reads that without problem. The problem is that I don't know how I can hold the numbers from the FileReader. My program is supposed to read a text from a file that file has 2 names with their school points.</p>
  
  <p>For example:</p>
  
  <blockquote>
    <p>Jack 30 30 30<br>
    Martin 20 20 30</p>
  </blockquote>
  
  <p>How can I find the one with the greater points?</p>
  
  <pre><code>public static void main(String[] args)  {
      String name = null;
      try {
          Scanner keybord = new Scanner(System.in);
          System.out.println("enter in file name");
          String filename = keybord.nextLine();
          Scanner file = new Scanner(new File(filename));
  
          while (file.hasNext())
          {
              name = file.nextLine();
              System.out.println(name);
  
              ///?? what do i have to write to compare to persons points
          }
      } catch(IOException e) {
          System.out.println("The file does not exist");
      }
  }
  </code></pre>