fred rosenberger wrote:'exceptions' do not occur at compile time. exceptions are pretty much defined as 'something you didn't expect to happen while your code is running happens'.
You can get errors when you compile. There are syntax errors where you spell things wrong, like 'fore' instead of 'for', or mis-matched brackets/parenes.
There are also things called 'checked exceptions'. If a method can throw a checked exception, and you don't handle it in your code, you will get an error. The exception itself doesn't happen - you have an error in your code for not dealing with something that is required.
What does Checked Exceptions actually means? Does JVM checks them ? If all exceptions come at runtime then why we have a different class of Runtime Exception ? I know Runtime exceptions are unchecked exception...