title: Using Shared Preferences for High Score saving
body: <p>Hell I am trying to make highscore for my project but my code is only saving last value not highest value
  How can I store only highest value? here is my code .</p>
  
  <p>This is saving process -> </p>
  
  <pre><code>            SharedPreferences prefs = getSharedPreferences(MY_PREFERENCES, Context.MODE_PRIVATE);
              SharedPreferences.Editor editor = prefs.edit();
              TextView outputView = (TextView)findViewById(R.id.textscore);
              CharSequence textData = outputView.getText();
  
              if (textData != null) {
                 editor.putString(TEXT_DATA_KEY, textData.toString());
                 editor.commit();
              } 
  </code></pre>
  
  <p>This is Reading process </p>
  
  <pre><code>  SharedPreferences prefs = getSharedPreferences(MY_PREFERENCES, Context.MODE_PRIVATE);
  
    String textData = prefs.getString(TEXT_DATA_KEY, "No Preferences!");
  
  
              TextView outputView = (TextView) findViewById(R.id.textread); 
  </code></pre>