FileDocCategorySizeDatePackage
DemoToStringUsage.javaAPI DocExample1587Sun Dec 14 22:47:40 GMT 2003oreilly.hcj.reflection

DemoToStringUsage

public class DemoToStringUsage extends Object
__UNDOCUMENTED__
author
Robert (Kraythe) Simmons jr.

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

param
args __UNDOCUMENTED__

		// Create some objects.
		Person p = new Person();
		p.setFirstName("Robert");
		p.setLastName("Simmons");
		p.setGender(Gender.MALE);
		p.setTaxID("123abc456");

		Customer c = new Customer();
		c.setPerson(p);
		c.setCustomerID(new Integer(414122));
		c.setEmail("foo@bar.com");

		SavingsAccount a = new SavingsAccount();
		a.setCustomer(c);
		a.setBalance(new Float(2212.5f));
		a.setID(new Integer(412413789));
		a.setInterestRate(new Float(0.062f));

		Set accounts = new HashSet();
		accounts.add(a);
		c.setAccounts(accounts);

		// Now print them.
		System.out.println(p);
		System.out.println(c);
		System.out.println(a);