I created a small function that simply writes text to a file, but I am having issues making it write each piece of information to a new line. Can someone explain why it puts
It looks to me, like you're working in windows in which case a new line character in not simply \n but rather \r\n
\n
\r\n
You can always get the correct new line character through System.getProperty("line.separator") for example.
System.getProperty("line.separator")