Selecting Methods from a Member List

   

This example uses Statement Completion's Member list feature to help you select a method of the String class. You may also use this procedure to select class member variables from the Member list.

Note   If you have completed the steps of Creating Statements with Word Completion and Selecting an Overloaded Method, continue with the following procedure. If not, take a few minutes and work through those procedures before selecting a method for the String class.

Before proceeding, make sure you have loaded a .java file into the Text editor that contains the following code:

String myStr = new String("Hello World!");

To select a class member from the Members List

  1. On a new line, type:
    if(mystr.
    
  2. When you type the "." (dot operator) after myStr, Statement Completion displays a list of the methods belonging to the String class.

Tip   If you do not get a member list after you type the dot operator, select List Members from the Edit menu or use the keyboard shortcut, CTRL+J. If this continues to happen, make sure you've enabled the Statement Completion feature.

  1. Type "equalsI" to highlight the String class's equalsIgnoreCase method in the Members List.

  2. Press Tab to insert the equalsIgnoreCase method after the dot operator for myStr.

    Both lines of your code should look like the following:

    String myStr = new String("Hello World!");
    if(myStr.equalsIgnoreCase
    

To continue building the next statement with Statement Completion's Parameter Info feature, see Building an Argument List with Parameter Info.