title: Reading a file and storing names and numbers in two arrays
body: <p>I'm working on a program that reads a file and stores the names and scores in two separate arrays, but I'm struggling. This is what I have so far. 
  I created an array for names called names, but I'm confused how I would copy the names into each index of the array.</p>
  
  <pre><code>import java.io.File;
  import java.io.FileNotFoundException;
  import java.util.Scanner;
  
  public class ScannerReadFileSplit {
       public static void main(String[] args) {
  
  File file = new File("NamesScore.txt");
  String[] names = new String[100];
  int[] scores = new int[100];
  int i;
  
   try {
        Scanner scanner = new Scanner(file);
        while (scanner.hasNextLine()) {
           String line = scanner.nextLine();
           String [] words = line.split("\t");
           for (String word: words) {
              System.out.println(word);
           }
         }
    } catch (FileNotFoundException e) {
       e.printStackTrace();
    }
   }
  }
  </code></pre>
  
  <p>My text file is:</p>
  
  <pre><code>John James      60
  Kim Parker      80
  Peter Dull      70
  Bruce Time      20
  Steve Dam       90
  </code></pre>