General
Last updated
Was this helpful?
Last updated
Was this helpful?
There are three kinds of exception:
Checked exceptions, which should be caught
Runtime exceptions, application exceptions which can't be predicted and need not to be caught
Errors, for problems from outside the application scope
Any class which extends from Throwable can be thrown:
This can be done at any point. But checked exceptions will need to be caught or declared.
Exceptions should be used to handle exceptional cases. Not for flow control.