title: Adding up the numbers read with BufferedReader
body: <p>I'm trying to get the mean of 20 numbers in my scores.txt file, but I can't figure out how to do it. Every time I try, my output gets all messed up. Thoughts?</p>
  
  <pre><code>    public static void main(String[] args) throws IOException,
      FileNotFoundException {
  
      String file ="/Users/vienna01pd2016/Desktop/scores/src/scores/scores.txt";
      processFile("/Users/vienna01pd2016/Desktop/scores/src/scores/scores.txt");
      //calls method processFile
      }
  
  
      public static void processFile (String file)
      throws IOException, FileNotFoundException{
      String line;
      //lines is declared as a string
  
  
       BufferedReader inputReader =
         new BufferedReader (new InputStreamReader
  (new FileInputStream(file)));
  
       while  (( line = inputReader.readLine()) != null){
  
        //System.out.println(line);
        double Value = Double.parseDouble(line);
       System.out.println(Value);
  </code></pre>