Hey Guys

Im scanning a txt file and searching for the next persons name, only issue is that i can't store these values into an array. So that i can later search for a name and it will show the average result. My code is as follows:

Code:
        public Students() throws IOException
  {
    Scanner in = new Scanner(new File("input.txt"));
    PrintWriter out = new PrintWriter("output.txt");
    while (in.hasNextLine())
  {
        String Line = in.nextLine();
        Scanner lineScan = new Scanner(Line);
        while(!lineScan.hasNextInt())
      {
         lineScan.next();
      }
        StringTokenizer st = new StringTokenizer(Line, " ");
        String name = st.nextToken();
        double snum1 = lineScan.nextInt();
        double snum2 = lineScan.nextInt();
        double snum3 = lineScan.nextInt();
        double amount = (snum1 + snum2 + snum3)/3 ;
        out.println(name + " " + amount);
    }
    out.close();
    in.close();
}

If someone can lead me in the right direction it will be much appreciative.