I am currently facing difficulty in transferring input values from a Scanner option in Java to a txt file. Although I can successfully read the data using try{} catch{}, I am encountering challenges when attempting to write the data from a scanner to the txt file. While I know how to write data to a txt file using PrintWriter, that method does not align with the requirements of my assignment. The task at hand requires me to develop a system that inputs values and stores the data in a text file, which is proving to be quite challenging.
I would greatly appreciate any assistance or solutions you may have to offer for this predicament. This project marks my first experience with Java. Thank you.