Question: I know double should not be compared by == operator directly, but how about if I define an initial value as 0.0?eg:

```
double a=0.0;
double b=
.
.
.

```

If a is not modified, does a\*b==0 always true?

Answer: 
```
if (!inputGuardian1.getText().toString().matches("")){
            Log.i("Putting text", "in sp");
          if(sharedPreferences != null){
            sharedPreferences.edit().putString("Guardian 1", guardian1).apply();
            Log.i("Putting text", "passed");
           }else{
            sharedPreferences = mContext.getSharedPreferences(PREF_NAME, PRIVATE_MODE);
            sharedPreferences.edit().putString("Guardian 1", guardian1).apply();
           }
        }

```
After all the editings, you need to call this,
editor.commit();

please go to this website <http://www.androidhive.info/2012/08/android-session-management-using-shared-preferences/>