How to handle errors in Java?
After throwing an exception in Java,
runtime systems finds something to handle it in the call stack
When it finds a suitable method that can handle the exception, it uses the method to catch the error.
If no method found, program exits.