Since you are saying that the progam runs without any error. Perhaps, your problem is that you can't find the file that you've just created.
By default, file created using PrintWriter
/ FileWriter
will be saved in the directory where you run your program.
Note that you can specify where you want to save the file you created by adding folder path in your file name. for example, if you want to save the question.list
in D:\
you can do this:
PrintWriter fileWriter = new PrintWriter(
new BufferedWriter(
new FileWriter("D:\questions.list", true)));