When you add a field to a class with the Create Field SmartGuide, you can choose to generate accessor ("get and set") methods for the field.
To open the Create Field SmartGuide, click the New Field toolbar
button . After
defining the field, enable the Access with getter and setter methods
check box, and set the appropriate options.
You also can add accessors to existing fields by doing the following things:
VisualAge for Java will generate the accessors.