title: Why use Context.MODE_PRIVATE or Context.MODE_WRITABLE?
body: <p>What I understood about <code>context.MODE_PRIVATE</code> or <code>MODE_READABLE, WRITABLE</code> is that those functions make files for sharedprefrences.</p>
  
  <p>I am wondering what the difference is between <code>context.getSharedPreferences(KEY, Context.MODE_PRIVATE)</code> and <code>getSharedPreferences(KEY, 0);</code>.</p>
  
  <p><code>getSharedPreferences</code> retrieves its preferences from a xml folder as far as I know. And <code>Context.MODE_PRIVATE</code> stores its files. And why use <code>context.getSharedPreferences(KEY, Context.MODE_PRIVATE)</code> if both <code>getSharedPreferences(KEY, 0)</code> and <code>context.getSharedPreferences(KEY, Context.MODE_PRIVATE)</code> makes files.</p>
  
  <p>Below is part of the Facebook API where I noticed <code>Context.MODE_PRIVATE</code>.</p>
  
  <pre><code>public static boolean save(Facebook session, Context context) {
      Editor editor =
          context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();
      editor.putString(TOKEN, session.getAccessToken());
      editor.putLong(EXPIRES, session.getAccessExpires());
      return editor.commit();
  }
  public static boolean restore(Facebook session, Context context) {
      SharedPreferences savedSession =
          context.getSharedPreferences(KEY, Context.MODE_PRIVATE);
      session.setAccessToken(savedSession.getString(TOKEN, null));
      session.setAccessExpires(savedSession.getLong(EXPIRES, 0));
      return session.isSessionValid();
  }
  </code></pre>