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():
- Select the appropriate radio button for the type of method you want to create.
- 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.)
- Click Next to edit the signature and set additional options, including
modifiers and exceptions.
To add a method from the repository:
- Select the Add methods from the repository radio button.
- 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.
- The Available editions list shows all the editions of the selected
method that can be added. Select one by enabling its checkbox.
- Click Finish.
