1You must close the FileWriter, otherwise it won't
2flush the current buffer. You can call the flush method directly..
3
4 fileWriter.flush()
5 fileWriter.close()
6
7You don't need to use the flush method if you are closing the file.
8The flush can be used for example if your program runs for a while
9and outputs something in a file and you want to check it