Zebra0.com

java debug2 types of errors

2 types of errors

Errors in programs are called bugs. Removing those errors so that the program works correctly is called debugging.

There are two main types of errors.

The first type of errors are syntax errors. Syntax errors prevent the program from running. They are also called compile errors. These errors are usually caused by misspelling words, leaving out required punctuation, or other types of typing mistakes. The compiler in a good IDE (integrated development environment) will usually point out these errors. In Eclipse you can click on the "Problems" tab below the code.

The second type of error are logic errors. With logic errors, the program runs but produces the wrong results. It could be something simple such as putting a decimal in the wrong place, or adding when you should have multiplied. But it can be much more complicated. These errors are sometimes very difficult to find.

NEXT: Breaking a program