Since the end-of-line sequence varies between different operating systems,
you should use the following to make your program system-independent.
Now the variable called newline contains the system-dependant end-of-line sequence. The
Java API may have a static variable that serves the same purpose hiding somewhere, but I was unable to find it.
HTH
Layne