This content has been marked as final. Show 3 replies
If the file already already exists you could assume it has headings in it and
not write them again.
You could modify the displayProgress method to accept a String parameter, the String which is to be appended to the file.
No problem, solution found:
Used similar code in main to write the headings as this is only done once.
Then the method that gets repeated (the one shown), appends after that.