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: 13.2.jpg
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:
13.1.jpg
The screenshot for describing an unused import statement is shown below:
13.4.jpg

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:
13.5.jpg
13.6.jpg
13.7.jpg

Code Generation

In NetBeans, a piece of code can be generated using Code Completion or using the Code Generating Dialog Box.
13.8.jpg
13.9.jpg

Navigation

Navigator:
13.jpg
13.11.jpg
Or press "Ctrl+Q" to return to the last edit document.