import java.io.*;
public class Test extends java.applet.Applet {
  
          public void init () {
               try {
               	     String s = System.getProperty("user.home");
                     PrintWriter out = new PrintWriter 
                        // (new FileWriter (File.separatorChar+"test.txt"));
                        (new FileWriter (s + File.separatorChar + "test.txt"));
                     out.println ("It functions! Applet writes into your home directory ...");
                     out.close ();
                     } catch (IOException ex) { ex.printStackTrace (); }
               }
     } 
