Download presentation
Presentation is loading. Please wait.
Published byLindsey Dawson Modified over 9 years ago
1
ERRORS
2
Types of errors: Syntax errors Logical errors
3
Syntax errors: In English, a mistake in the grammar rules of the language In Java, is a mistake in the rules of the language Is detected by Java compiler. A program that contains a syntax error will not be compiled. Are called compile-time errors
4
Logical errors: The program can be compiled but, when we attempt to run the program, it doesn’t perform the intended task. To deal with logical statement, you have to debug the program. - print statements - Dr. Java Debugger.
5
Example of a logical error Which statement is a logic error? a) Omitting the ; from the end of the sentence. b) Using the less than ( ) operator was intended. c) Typing STATIC instead of static for the random function d) Misspelling the name of a variable in the program.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.