title: How to use SharedPreferences to save more than one values?
body: <p>I am developing a dictionary app. In my app, I assume that user wants to save favourite words. I have decided to use <strong>SharedPreferences</strong> to save these values (I am aware that SQLite and files are better but I am stuck to "SharedPreferences", so keep on with it).</p>
  
  <p>Here below is my code:</p>
  
  <pre><code>@Override
  public void onClick(View v) {                                       
      SharedPreferences faves = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
      { 
          SharedPreferences.Editor editor = faves.edit();
          editor.putString("favourite", mSelectedDB + "::" + mCurrentWordId + "::" + mCurrentWord + ",");
          editor.commit();    
      }
      Log.i(CONTENT_TAG,"Favourite saved!");
  
      Toast toast = Toast.makeText(ContentView.this, R.string.messageWordAddedToFarvourite, Toast.LENGTH_SHORT);
      toast.show();   
  }
  </code></pre>
  
  <p>The problem is that it does not retain more than one favourite word. I mean only one favourite word is saved and when a new one is added, the previous is erased.</p>
  
  <p><strong>So, how can the above code be edited so that this problem is solved?</strong></p>
  
  <p>Can you guys there help? Thank you very much.</p>