Question:Consider the following snippet of code:
<font size =2>
@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>?
</font>
 

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: 1846

Copyright © 2024. Powered by Intellect Software Ltd