Download presentation
Presentation is loading. Please wait.
1
Fundamentals of Software Development 1Slide 1 Correcting Compile Time Errors Above all don’t panic!Above all don’t panic! Read the error messageRead the error message Work through errors one at a timeWork through errors one at a time Check adjacent linesCheck adjacent lines
2
Fundamentals of Software Development 1Slide 2 Above all don’t panic! One error can lead to multiple error… For example consider how many errors the following piece of code will get…One error can lead to multiple error… For example consider how many errors the following piece of code will get… int i; j = i; k = j + 2; m = j * 2; n = j – 2; p = j / 2; Don’t judge a book by its cover!Don’t judge a book by its cover!
3
Fundamentals of Software Development 1Slide 3 Read the Error Message Read the error message carefullyRead the error message carefully –A number of times the answer to your problem will be there… System.out.println("Enter a string);System.out.println("Enter a string); –gives the error message: unclosed string literal
4
Fundamentals of Software Development 1Slide 4 Work through errors one at a time Take your time working through errorsTake your time working through errors Focus on one error at a timeFocus on one error at a time Recompile the program as needed to see monitor your progressRecompile the program as needed to see monitor your progress
5
Fundamentals of Software Development 1Slide 5 Check Adjacent Lines Sometimes the error message relates toSometimes the error message relates to –the previous line –the next line For exampleFor example –Line 28: System.out.println("Goodbye!") –Line 29: System.out.println(5); –gives error message: ; expected at Line 29; expected at Line 29
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.