In other lay man terms, Compilation errors does NOT let your class get compiled successfully. If you use an
IDE like eclipse, netbeans, IntelliJ IDEA etc., you would get a red underline on the lines which have a compiler error. Examples are given by other ranchers in the above posts.
Whereas a Runtime exception (or an error) does NOT prevent the class from getting compiled. The
Java class would get compiled successfully and only at the runtime (during execution) the errors would be caught and thrown.
Does it help?