title: Java Exception handling for NullPointerException
body: <p>I am having the following exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.NullPointerException
      at Studentlist.Studentlist(Studentlist.java:79)
      at Studentlist.main(Studentlist.java:38)
  </code></pre>
  
  <p>on line 38:
  I am passing to input to getstudentsprofile.</p>
  
  <p>on line79:
  I am doing :            </p>
  
  <pre><code>int z= array1.length;
  </code></pre>
  
  <p>How to debug this issue.
  I am reading lot of records and everything it is crashing at one place with this exception.
  How to debug this? how can I see when the exception happened what are the values?</p>
  
  <p>Infact I have :</p>
  
  <pre><code>catch (IOException ee)
          {
              ee.printStackTrace();
          }      
  </code></pre>
  
  <p>but no luck.</p>