SECTION 8 Time Savers

Tip 61: Code More Quickly with Automatic Code Completion

The IDE’s code completion feature assists you with writing code as you type. Code completion works in Java, Javadoc, HTML, XML, and Ant files, among other file types. Here are some examples of how to use this time saver:

image  Create a new Java class and add instance variables. Place the caret after the instance variables and press Ctrl-Space to call up the code completion dialog. The IDE will suggest to generate a matching constructor. The generated constructor will contain an appropriate method signature and skeleton code to initialize the instance variables (see

Get 100 NetBeans™ IDE Tips & Tricks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.