i'm making a program that views a text file and prints it to the console in eclipse. One of the lines in the text file looks like this...
A.Matthews 4 7 3 10 14 50
when running the program, I get an error like this..

and this is the program
import java.io.*; // for File
import java.util.*; // for Scanner
public class MapleLeafLab {
public static void main(String[] args) throws FileNotFoundException {
Scanner input = new Scanner(new File("mapleleafscoring.txt"));
while (input.hasNextLine()) {
String line = input.nextLine();
Scanner lineScan = new Scanner(line);
String name = lineScan.next(); // e.g. "Eric"
String rest = lineScan.next();
int GP = lineScan.nextInt(); // e.g. 456
int G = lineScan.nextInt();
int A = lineScan.nextInt();
int P = lineScan.nextInt();
int S = lineScan.nextInt();
Double SS = lineScan.nextDouble();
System.out.println(name+rest+" "+GP+" "+G+" "+A+" "+P+" "+S+" "+SS);
//System.out.println(name + " (ID#" + id + ") worked " +
// sum + " hours (" + average + " hours/day)");
}
}
}
Scanners inside the loop. One solution can be to read the file line by line and then usesplitto separate items in each line.