title: Android: string value is not getting in Shared Preference
body: <p>I have created a shared preference for a boolean value and for a string value. The boolean value is gotten in another activity. But for the string I am only getting default value.</p>
  
  <h2>Home.class</h2>
  
  <pre><code>    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
      SharedPreferences.Editor spe = prefs.edit();
  
      spe.putBoolean("flag", true); 
      spe.putString("user", "hello");
      spe.commit(); 
  </code></pre>
  
  <h2>welcome.class</h2>
  
  <pre><code>      SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
      boolean flag= prefs.getBoolean("flag", false); 
      String user=prefs.getString("user","Nothing");  
  
        TextView tv = new TextView(this);
        tv.setText("Flag : "+flag+(" User : "+user);
  </code></pre>
  
  <p>For 'user', only 'Nothing' is displaying. Where should I correct my code?</p>