I am trying to load the saved string in a separate class in the same way.
public class Load extends AppCompatActivity{ public Load(){ } public String crip(){ sPref = getSharedPreferences("key", MODE_PRIVATE); ld = sPref.getString(KEY,""); return ld; } } trying to get a string from another class in this way
Load losd = new Load(); load.crip () this is what I am trying to output to the logs, but when I launch the android studio it refers to the zero object here
sPref = getSheredPreferences("key", MODE_PRIVATE);
pref = context.getSheredPreferences("key", MODE_PRIVATE);- pavlofff