The code completion box is displayed, providing a scrolling list of possible classes, methods, variables, and so on that can complete your expression. For methods and fields, the code completion box displays only static or nonstatic options as appropriate, depending on the context of your code. Local variables are displayed in bold. The names of deprecated classes and class members are struck through.
If the code completion database contains only one possible completion for the expression, the expression is completed automatically.
Useful times to press Ctrl-spacebar include while entering the first parameter of a method and while typing a package name. Even if you disable automatic code completion completely, you can still access the code completion box at any time by pressing Ctrl-spacebar.
If you press Enter for a method with parameters, replaceable text is given for the first parameter, which you can then fill in. If the method takes multiple parameters, you can reopen the list by typing a comma after you fill in each parameter.
If the IDE recognizes the type of parameter required, its type is shown in the header of the code completion box. If not, a question mark (?) is displayed.
If you enter a parameter that does not match any of the recognized parameter combinations for the method name, all the recognized methods and their parameter lists are displayed and an asterisk (*) appears in the header of the code completion box.
![]() |
The elements displayed in the Java code completion box are defined by the code completion database. If the elements do not appear correctly for a class, you may need to update the code completion database. See Code Completion Database. |
See Also | |
---|---|
Using Javadoc With Code Completion
Setting the Completion Box Delay Disabling Automatic Completion Setting Code Completion Shortcuts |