Я делаю программу, которая просматривает текстовый файл и печатает его на консоли в Eclipse.Одна из строк в текстовом файле выглядит следующим образом ...
A.Matthews 4 7 3 10 14 50
при запуске программы выдается ошибкавот так .. ![enter image description here](https://i.stack.imgur.com/2n5AF.png)
и это программа
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)");
}
}
}