FileDocCategorySizeDatePackage
PropsCust.javaAPI DocExample713Tue Mar 13 15:32:42 GMT 2001None

PropsCust

public class PropsCust extends Object
Use a Properties object for customizing a program.

Fields Summary
Properties
p
String
userName
String
userDir
Constructors Summary
PropsCust()
Construct a PropsCust program

		p = new Properties();

		p.load(System.in);
	
Methods Summary
public static voidmain(java.lang.String[] argv)
A demonstration main program

		new PropsCust().process();
	
voidprocess()
Just show some properties

		userName = p.getProperty("username", "Unknown User");
		userDir  = p.getProperty("directory", "/");

		System.out.println("Hello " + userName + ".");
		System.out.println("We are using the " + userDir + "directory today.");