Question:Consider the following snippet of code:
@Override
protected void onStop
{
Super.onStop();
SharedPreferences setting = getSharedPreferences("MyPrefs", 0);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean("MyBool", true);

<some more code here>
}
Which of the following should be used <some more code here>? 

A editor.save(); editor.close(); 

B editor.save(); editor.finish(); 

C editor.commit(); 

D editor.save(); 

E editor.close(); 

F editor.finish(); 

+ Answer
+ Report
Total Preview: 2234

Copyright © 2024. Powered by Intellect Software Ltd