FileWriter() writer = new FileWriter("example.txt"); writer.write("First Line" + " "); // creates a new line writer.write("Second Line");