This article introduces code formatting or code assistance provided by the NetBeans IDE Java editor.
Introduction
This article introduces code formatting or code assistance provided by the NetBeans IDE Java editor. This article covers the various categories of code formatting, in other words:
These are discussed below one by one.
Overlooking Imports
The NetBeans IDE continuously checks the code for the correct use of import statements and instantly provides notification when unused or non-imported classes are determined to exist.
The error mark looks like this:
We can click on the error mark either to add the missing import or to create the class on the existing package. While typing one can press "Ctrl+Shift+I" to add the non-imported statements.
The screenshot showing the condition above is as follows:
The screenshot for describing an unused import statement is shown below:
Faster Code Completion
NetBeans lets you complete the code faster than any other editor, this is very useful when a missing code is to be filled. The code is completed quickly in the following ways:
Code Generation
In NetBeans a piece of code can be generated using Code Completion or using the Code Generating Dialog Box.
Navigation
Navigator:
Or press "Ctrl+Q" to return to the last edit document.
Solutions Manual to Objects First with Java – A Practical Introduction using BlueJ