Fixing Errors

As you compose a program .in the NetBeans source editor, errors are flagged with a red alert icon to the left of the editor pane, as shown in Figure 2.2.

Figure 2.2. Spotting errors in the Source Editor.

Image

The icon appears on the line that triggered the error. You can click this icon to display an error message that explains the compiler error with these details:

• The name of the Java program

• The type of error

• The line where the error was found

Here’s an example of an error message you might see when compiling the Saluton program:

cannot find symbol.symbol  : variable gretinglocation: class Saluton

Tip

This book’s official website ...

Get Sams Teach Yourself Java™ in 24 Hours, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.