PropsDemo.javaAPI DocExample693Tue Mar 13 15:32:42 GMT 2001None


public class PropsDemo extends Object
Demonstrate the Properties class

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

	Properties ian = new Properties();

	// Set my data.
	ian.setProperty("name", "Ian Darwin");
	ian.setProperty("favorite popsicle", "cherry");
	ian.setProperty("favorite rock group", "Fleetwood Mac");
	ian.setProperty("favorite programming language", "Java");
	ian.setProperty("pencil color", "green");

	// should return the string "green".
	String ianColor = ian.getProperty("pencil color");

	// Don't know what it will return.
	String sysColor = System.getProperty("pencil color");

	// Now list the Properties, using System.out