Search VisualAge for Java Information Go to Information Home Page Go to VisualAge for Java WWW Site

Create Method

The Add Method SmartGuide lets you create a new method, constructor, or main() method, or add an existing method from the repository.  The method is added to the class that was selected when you started the SmartGuide.

To create a new method, constructor, or main():

  1. Select the appropriate radio button for the type of method you want to create.
  2. Input the method's signature, specifically the return type, the method name, and the list of parameters.  (Note: you can also specify these things on the next page of the SmartGuide.)
  3. Click Next to edit the signature and set additional options, including modifiers and exceptions.

To add a method from the repository:

  1. Select the Add methods from the repository radio button.
  2. The Available names list shows all the methods that can be added to the current class.  Only methods that were created for the current class can be added back.  Select the method by enabling its check box.
  3. The Available editions list shows all the editions of the selected method that can be added.  Select one by enabling its checkbox.
  4. Click Finish.