- Why is exception handling important?
- What design pattern is used to implement exception handling features in most languages?
- What is the need for finally block?
- In what scenarios is code in finally not executed?
- Will finally be executed in the program below?
- Is try without a catch is allowed?
- Is try without catch and finally allowed?
- Can you explain the hierarchy of exception handling classes?
- What is the difference between error and exception?
- What is the difference between checked exceptions and unchecked exceptions?
- How do you throw an exception from a method?
- What happens when you throw a checked exception from a method?
- What are the options you have to eliminate compilation errors when handling checked exceptions?
- How do you create a custom exception?
- How do you handle multiple exception types with same exception handling block?
- Can you explain about try with resources?
- How does try with resources work?
- Can you explain a few exception handling best practices?