import java.io.*; public class WriteMessage { public static void main(String Args[]) { String message = "LIEK HAI DER MEESTAH GAZZA"; try { FileOutputStream out = new FileOutputStream("message.txt"); PrintStream p = new PrintStream( out ); p.println(message); p.close(); }catch (IOException e){ System.err.println ("Error writing to file"); } } }