I'm trying to output some text to a file using a FileWriter, but i cannot figure out how to begin a new line to add the next String of text to the file, cause the "\n" character didn't work... Please be something simple.
Hi Wes, Welcome to JavaRanch! "\n" is a specific character, the one used on UNIX to denote end of line. Other operating systems use other things; Windows uses the two characters "\r\n". The old Mac OS used just "\r"! The PrintWriter class can help you abstract these differences away. Its "println" method contains logic that does the right thing for the local system -- println() sends the right line-ending characters for the local platform.