title: Integer.parseInt Error : java.lang.Integer.parseInt(Unknown Source)
body: <p>I'm working on a Java project to Add each Integer to the one in the next line until there's no lines to read in the file.
  So to be able to add it I have to use Integer.parseInt(...) to the line then add it.
  P.S : the for loop will just skip two lines which contain the header of the file. And all the string are refering to numbers which Integer.parseInt() accepts.</p>
  
  <p>Here's the full exception error :</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: null
  at java.lang.Integer.parseInt(Unknown Source)
  at java.lang.Integer.parseInt(Unknown Source)
  at prog.Result(prog.java:93)
  at prog.main(prog.java:56)
  </code></pre>
  
  <p>The code resulting in the exception is :</p>
  
  <pre><code>public static void Result() throws IOException
      {
          FileReader fileReader = new FileReader(dir+"/"+log_file);
          BufferedReader bufferedReader = new BufferedReader(fileReader);
          int i;
          for (i=0;i&lt;=2;++i)
          {
              bufferedReader.readLine();
          }
          int result =0;
          while (bufferedReader.readLine() != null)
          {
              result += Integer.parseInt(bufferedReader.readLine());
  
          }
          System.out.println("The Result Is : " + result);
  
      }
  </code></pre>