android sharedprefences
<p>im having a bit of problem with this code can anyone help me with where im going wrong im getting a null pointer exception</p>

<p>SharedPreferences mPrefs;</p>

<pre><code>protected void onPause() {
    super.onPause();

SharedPreferences.Editor ed = mPrefs.edit();
    ed.putString("names", names);
    ed.putString("numbers", numbers);
    ed.commit();
}   

@Override
protected void onResume() {
    // TODO Auto-generated method stub
    super.onResume();

    SharedPreferences mPrefs = getSharedPreferences("xyz", 0);
    mPrefs.getString("names", "");
    mPrefs.getString("numbers", "");

}
</code></pre>
