Java Reference
In-Depth Information
Similarly, when there is a compilation error, NetBeans will underline the offending
line with a red squiggly line, and place the following icon on the left margin of
said line.
Again, the light bulb indicates that NetBeans has suggestions on how to fix
the problem. Hitting Alt + Enter in the offending line will allow us to see the
suggestions that NetBeans has.
NetBeans not only provides visual cues for errors in our code, it also provides other
cues, for example, placing the caret next to an opening or closing brace will highlight
both the opening and closing brace, as shown in the populateList() method. This
is demonstrated in the previous screenshot.
If one of our methods overrides a method from a parent class, the following icon will
be placed in the left margin next to the method declaration:
The icon is an upper case "O" inside a circle, the O stands for "override".
Similarly, when one of our methods is an implementation of a method declared
on an interface, the following icon will be placed in the left margin of the
method declaration.
The icon is an uppercase "I" inside a green circle, which stands for "implements".
NetBeans also provides visual cues in the form of fonts and font colors, for example,
static methods and variables are shown in italics , member variables are shown in
green, and Java reserved keywords are shown in blue.
Another nice feature of the NetBeans editor is that highlighting a method or variable
highlights it everywhere it is used in the currently open file.
 
Search WWH ::




Custom Search