MCQOPTIONS
Saved Bookmarks
| 1. |
You want to store website name by using SharedPreferences. Choose the correct option for doing this. |
| A. | SharedPreferences obj=getSharedPreferences("MySharedFile", Context.MODE_PRIVATE); obj.putString(“name”, “CareerRide.com”); obj.commit(); |
| B. | SharedPreferences obj= new SharedPreferences ("MySharedFile", Context.MODE_PRIVATE); String n=obj.getString("name", null); |
| C. | SharedPreferences obj=getSharedPreferences("MySharedFile", Context.MODE_PRIVATE); Editor editor=obj.edit(); editor.putString(“name”, “CareerRide.com”); editor.commit(); |
| D. | None of the above. |
| Answer» D. None of the above. | |