Saving and Loading .txt files (ANDROID)

what do you mean imported context? is it getContext();?
.

what do you mean in a fragment?
.
.
I didnt notice your reply until now and I have been playing around with FilePaths, here is my current code that I am experimenting with for getting the FilePath, is this right?
RandomAccessFile HSPath = new RandomAccessFile(new File (getContext().getFilesDir() + "/sc.txt"), "rw");

if that is actually correct, how do I read an (int/string to convert into an int) from this file

what do I do to read out the string?

void initHighscore() {
  highscore = 0;
  try{
    
    HSPath = new RandomAccessFile(getContext().getFilesDir()+"example.txt","rw");
    println(HSPath);
    
  } catch (FileNotFoundException e) { 
    String[] aaa = {"0"};
    saveStrings("example.txt", aaa);
    println("something has gone wrong " + e);
    
    try {
      HSPath = new RandomAccessFile(getContext().getFilesDir()+"example.txt","rw");
    } catch(FileNotFoundException a) {
      println("something has gone wrong " + e);
    }
  }
}