You can use Unified Modeling Language (UML) class diagrams to add
fields to Java™ classes and interfaces.
To add a field to a Java class or interface:
- In the diagram editor, right-click a Java class or interface; then click .
- In the Create Java Field wizard, in the Name field,
type a name for the new field.
- In the Initial Value field, specify the
initial value expression.
- Under Type and Dimensions, click a type
and specify dimensions.
- Under Visibility, click a visibility style.
- Under Modifiers, click modifiers.
- Click Finish.
Note: You can also use the action bar to add fields to Java classes
and interfaces.