Txt file input error Java
<p>I'm getting the error </p>

<pre><code>Exception in thread "main" java.lang.NumberFormatException: For input string: "scores.txt"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)
at java.lang.Double.parseDouble(Double.java:510)
at ExamAverage.main(ExamAverage.java:30)
 C:\Users\Peter\AppData\Local\Temp\codecomp5461808896109186034.xml:312: Java returned: 1
</code></pre>

<p>for my code listed below what does this error mean? I'm trying to go line by line from a given text file path and output it in a certain format.</p>

<pre><code>       import java.io.FileReader;
      import java.io.FileNotFoundException;
      import java.util.Scanner;
      import java.io.PrintWriter;

      public class ExamAverage
     {

     public static void main(String[] args)
  throws FileNotFoundException
  {
  String inputFileName = "scores.txt";
  String outputFileName = "examScoreAverage.txt";
  Scanner console = new Scanner(System.in);
  Scanner in = new Scanner(inputFileName);
  PrintWriter out = new PrintWriter(outputFileName);
  int TestNumber = 1;
  double totalPoints = 0;
  double avg = 0;
  double test = 0;

    while (in.hasNextLine())
    {
       String line = in.nextLine();
          test = Double.parseDouble(line);
       out.println("Score" + TestNumber + " : " + test);
       totalPoints += test;
       TestNumber++;
    }
       avg = totalPoints/TestNumber;
       out.println("Number of scores read: " + TestNumber );
       out.println("Average Score " + avg );
   in.close();
out.close();
</code></pre>

<p>}
}</p>
