Write lines of text to file using a PrintWriter

This example shows how to write multiple lines of text to a file.
The method writeLinesToFile takes three arguments:

1. The name of the file, could be an absolute path but in the example just a filename
so it will be created in the current directory.

2. An array of Strings where each element is one line in the file.

3. A boolean value to determine if any existing file with the same name should be
appended to or not. In the example we choose to append.

Search for more Java info on this site here:
Custom Search

Please type any questions here.