title: Reading txt file in java, program skipping the first line
body: <p>My program is skipping the first line of my .txt file. Here is where my code is supposed to read from the .txt file. </p>
  
  <pre class="lang-java prettyprint-override"><code>static int getPints(int[] pints) throws IOException {
      Scanner inputFile = new Scanner(new File("BloodInFile.txt"));
      int count = 0;
      while (inputFile.hasNext()) {
          pints[count] = inputFile.nextInt();
          count++;
      }
      return pints[count];
  }
  </code></pre>
  
  <p>It should be reading 7 integers, but I only get 6 of them to be read. 
  The rest of the code works, but I am not sure how to get it to read the first integer.</p>
  
  <p>This is the rest of my code:</p>
  
  <pre class="lang-java prettyprint-override"><code>static int getPints(int[] pints) throws IOException {
      Scanner inputFile = new Scanner(new File("BloodInFile.txt"));
      int count = 0;
      while (inputFile.hasNext()) {
          pints[count] = inputFile.nextInt();
          count++;
      }
      inputFile.close();
      return pints[count];
  }
  
  static double getAverage(int pints[], int MAX_HOURS) {
      int counter;
      double totalPints = 1;
      double averagePints;
      for (counter = 1; counter &lt; MAX_HOURS - 1; counter++) {
          System.out.println("pints:" + pints[counter]);
          totalPints = totalPints + pints[counter];
      }
      averagePints = totalPints / (MAX_HOURS - 2);
      System.out.println("Total pints: " + totalPints);
      return averagePints;
  }
  
  static double getHigh(int pints[], int MAX_HOURS) {
      int index = 1;
      double highest = pints[index];
      for (index = 1; index &lt; MAX_HOURS - 1; index++) {
          if (pints[index] &gt; highest) {
              highest = pints[index];
          }
      }
      return highest;
  }
  
  static double getLow(int pints[], int MAX_HOURS) {
      int index = 1;
      double lowest = pints[index];
      for (index = 1; index &lt; MAX_HOURS - 1; index++) {
          if (pints[index] &lt; lowest) {
              lowest = pints[index];
          }
      }
      return lowest;
  }
  </code></pre>