import java.io.File;

public class Sample {

    /**
     * This sample class performs the following operations:
     * <ul>
     * <li> Access the System property <i>java.home</i>
     * <li> Access the System property <i>user.home</i>
     * <li> Access the file <i>foo.txt</i>
     * </ul>
     *
     * @exception SecurityException if the caller does not have permission
     *		to perform any of the operations listed above.
     */
    public static void main (String[] args) throws SecurityException {

	// If there were any arguments to read, we'd do it here.

	System.out.println("\nYour java.home property value is: "
			    +System.getProperty("java.home"));

	System.out.println("\nYour user.home property value is: "
			    +System.getProperty("user.home"));

	File f = new File("foo.txt");
	System.out.print("\nfoo.txt does ");
	if (!f.exists())
	    System.out.print("not ");
	System.out.println("exist in the current working directory.");
    }
}

