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 icon shown below 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 doSomething() method in the
above screenshot.
If one of our methods overrides a method from a parent class, the icon shown below
will be placed in the left margin next to the method declaration.
The icon is an upper case "O" inside a circle, the O , of course, stands for override .
Similarly, when one of our methods is an implementation of one of the interfaces
that our class implements, the icon shown below 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, all of the above cues can be
seen in the screenshot at the beginning of this section.
Another nice feature of the NetBeans editor is that highlighting a method or variable
highlights it everywhere it is used in the current open file.
 
Search WWH ::




Custom Search