title: It is throwing exception java.lang.NumberFormatException: Cannot parse null string?Why?
body: <p>this is in main method I just Want to sum the numbers available in the text file located in E:\Java_Examples\data.txt.</p>
  <pre class="lang-java prettyprint-override"><code>int sum = 0;
          
          try {
              
               FileReader f1 = new FileReader(&quot;E:\\Java_Examples\\data.txt&quot;);
  
               BufferedReader s1=new BufferedReader(f1);
               String line=&quot;&quot;;
               while(s1.readLine()!=null)
               {
                   
                   line=s1.readLine();
                   sum+=Integer.parseInt(line);
                   
               }
               s1.close();
            } catch(IOException e)
           {
               System.out.println(&quot;File not found&quot;);
            } 
  </code></pre>
  <p>Can anyone help with this?</p>