Answer the question
In order to leave comments, you need to log in
How to save the line when choosing the wrong answer?
Hello, please tell me how can I save the lines in the file when the user selects the wrong answer in the test. I am writing a program - Russian Language Test - and I need to display user errors in a TextView in a dialog box. During testing, for example, if the user selects option "A" and it is incorrect, I need to write this question, option "A", and the correct option to a file. This continues until the end of the test. In fact, I have to write in one file several times by opening and closing it.
Answer the question
In order to leave comments, you need to log in
Optional "open and close file". You can open the file before the start of the test, write errors to the file as the test passes, close the file after the end.
You can also save errors in some kind of temporary list, and after the end of the test, dump the entire list into a file at once.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question