How to save data in a program

Hi

Hi

This example from APDE I just changed the path

String[] lines;
int index = 0;
String filepath = "/storage/emulated/0/test/positions.txt/";
void setup() {
  size(800, 800);
  background(0);
  stroke(255);
  frameRate(12);
  lines =  loadStrings(filepath);

    
}

void draw() {
  if (index < lines.length) {
    String[] pieces = split(lines[index], '\t');
    if (pieces.length == 2) {
      int x = int(pieces[0]) * 2;
      int y = int(pieces[1]) * 2;
      point(x, y);
    }
    // Go to the next line for the next run through draw()
    index = index + 1;
  }
}

Read this