Originally posted by bobbie Giant:
I'm always confused by these two features.Sometimes it's not so easy to differentiate them.Is there any tips to help?
The short answer is that the compile time errors are a result of running the
javac program on some source (.java) file(s) that have one or more mistakes in language usage (missing import statements, typos, etc). The compiler can't translate the source file into a .class file due to the errors.
Run-time errors are generated from programs that are correctly written
as far as the syntax of the language is concerned but have some error in logic (for example, attemping to use a reference to an object that has been set to null....
Is that where your question was heading?