import java.io.*;public class Write { public static void main(String[] args) throws IOException { String str; if(args.length <= 0) { System.out.println("Aufruf: Write <DateiName>"); return; } BufferedWriter br = new BufferedWriter ( new FileWriter( args[0] )); while((str = br.writeLine()) != null) { System.out.println(str); } br.close(); }}