-1

How can I save a file in a selected folder in Java?
I need it like this: storage/emulated/0/myfile.txt
Is there is an example?

tquadrat
  • 2,281
  • 13
  • 22
RD1706
  • 3
  • 2

1 Answers1

0
try (PrintWriter out = new PrintWriter("storage/emulated/0/myfile.txt")) {
    out.println(text);
}

If this is not what you want you'll have to add more details

Brentspine
  • 226
  • 10