Completing a Java Expression

See Also

As you are typing in the Source Editor, you can use the IDE's code completion feature to find code snippets and have them filled in for you automatically. The code completion feature works by displaying a completion box that suggests possible ways of completing the expression that you are typing. In addition, a Javadoc box also appears and shows the code documentation for the item currently selected in the completion box.

You can use code completion to fill in:

To complete a Java expression:

  1. In the Source Editor, press Ctrl-Spacebar or Ctrl-\ to open the code completion box.

    The code completion box displays a scrolling list of possible classes, methods, variables, and so on that can complete your expression. If the IDE is aware of only one possible completion for the expression, the expression is completed automatically.

    You can open the code completion box either at the beginning of a line or after you have already typed the beginning of an expression, such as in one of the following examples:

  2. Use the most convenient combination of the following options to select an item from the code completion box:

Notes:

See Also
Inserting Code From a Template
Using Editor Hints to Fix Code
Using the Word Match Feature
Generating Getter and Setter Methods
Managing Java Import Statements
Code Completion Javadoc Box
Setting the Completion Box Delay
Disabling Automatic Completion
Setting Code Completion Shortcuts

Legal Notices