title: Converting string to integer - SharedPreferences
body: <p>My first Class:</p>
  
  <pre><code>     public SharedPreferences abc;
       abc = getApplicationContext().getSharedPreferences("Trening",0);
  </code></pre>
  
  <p>My second Class(extends first class):</p>
  
  <pre><code>    Integer i = Integer.parseInt(abc.getString("T1","0")); 
  </code></pre>
  
  <p>The Error is:</p>
  
  <pre><code>     Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.content.SharedPreferences.getString(java.lang.String, java.lang.String)' on a null object reference
  </code></pre>
  
  <p>I learn to program for 3 days and hope you can help me and explain how to fix it, so I can learn.</p>
  
  <p>Sorry for my english. :)</p>