I am trying to print some text line by line using the PrintWriter
I have tried various combinations such as
1. mystring.trim() before println(mystring)
2. not using println and using \n instead
but my output file always ends up with a "trailing white space" at the end of each line. How can I remove that?