title: How can I get the existing value key from a sharedPreferences file
body: <p>How can I get  the existing value key from a <code>sharedPreferences</code> file?  I know that perhaps there is the <code>getString</code> method to do this. </p>
  
  <p>But please see the following code, I have no any existing key value in my <code>sharedPreferences</code> file still But when I test and I want get a key value from the file(<strong>While it has no any existing key value still</strong>) using a condition, the first condition will run.</p>
  
  <pre><code>    public class MainActivity extends Activity {
  TextView textView;
      Button button;
      SharedPreferences sharedPreferences;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          textView = (TextView) findViewById(R.id.t);
          button = (Button) findViewById(R.id.button);
          sharedPreferences = getSharedPreferences("my file",MODE_PRIVATE);
          String s = sharedPreferences.getString("1","1");
          if(s == "1")
          { textView.setText("I am a value");//it will run this condition and it seems that the getString() method is like the putString() method }
      else { textView.setText("I am not a value"); }
      }
  </code></pre>