title: Putting names and numbers from a text file into arrays
body: <p>There is a list of ranks, names, and popularity  1 Jake 21021 (rank, the actual name, how many babies were given that name that year)  I am trying to take these three separate things, and divide them up into arrays. That way if a user searches for "Jake" rank: 1 pops up and so does 21021.  This is what i have so far... </p>
  
  <pre><code>import java.util.*;
  import java.io.*;
  
  public class Test
  {
      public static void main(String[] args)
  
      {
          Scanner inputStream = null;
          try
          {
              inputStream = new Scanner(new FileInputStream("src/boynames.txt"));
          }
          catch (FileNotFoundException e)
          {
              System.out.println("Sorry we couldn't find the requested file...");
              System.out.println("Exiting...");
              System.exit(0);
          }
          //Initializing the BOY Variables
          int[] counter = new int[1];
          String[] name = new String[1];
          int[] popularity = new int[1];
          //End of initializing BOY variables
          for (int i=0; i &lt;1000;i++)
          {
              counter[0] = 1;
              name[i] = inputStream.next();
              popularity[i]=inputStream.nextInt();
              System.out.print(counter[i] + " " + name[i] + " " + popularity[i] );
              counter[i] = counter[i] + 1 ;
          }
      }
  }
  </code></pre>
  
  <p>i keep getting an error </p>
  
  <pre><code>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
      at Test.main(Test.java:27)
  </code></pre>
  
  <p>any help would be awesome!
  thanks</p>