import java.applet.*;import java.io.*;import java.lang.*;public class writeFile { public static void main(String[] args) { try{ File datei = new File("c:\\test.txt"); BufferedWriter writer = new BufferedWriter(new FileWriter(datei)); writer.write("Hallo\n\r"); writer.write("Hallo2 mit Zeilenumbruch"); writer.close(); } catch(Exception e) { System.err.println(e.getMessage()); } }}