You want to read website name by using SharedPreferences. Choose the correct option for doing this.

You want to read website name by using SharedPreferences. Choose the correct option for doing this.



A) SharedPreferences obj=getSharedPreferences("MySharedFile ", Context.MODE_PRIVATE);

String n=obj.getString("name", null);

B) SharedPreferences obj= new SharedPreferences ("MySharedFile", Context.MODE_PRIVATE);

String n=obj.getString("name", null);

C) String n=obj.getString("name", null);

D) None of the above.



Answer: A


Learn More :