Possible Duplicate:
Runtime vs Compile time
How should I know whether a specific line of code in Java may throw a compile time or run-time error? Assuming that the specific line of code anyway throws and error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Eclipse, compile time errors will be underlined in red. A compile time error is an error that is detected by the compiler. Common causes for compile time errors include:
If the compiler detects any errors during compilation it will fail to build a new assembly (or class file in Java).
Even if your code has no compile time errors, errors can still occur on run-time. Errors such as ‘logic errors’ and ‘runtime errors’. A good example of a runtime error is as followed:
To detect which line exactly a run-time error occurs on you can use a combination of break points in Eclipse and proper exception handling.