filewriter extra new line at the start code example Example: java filewriter new line fileWriter.write(System.lineSeparator());