I'm going to use PrintWriter
PrintWriter out = new PrintWriter("filename.txt");
Create a file to write to.
out.println(text);
This is how you write it on the file. Write all the exception processing and files and call out.close()
.
© 2025 OneMinuteCode. All rights reserved.