Should Unchecked Exceptions Be Handled?
As Has Been Mentioned Before, the Only Real Difference Is That for Checked Exceptions You Have to Handle Them (By Letting Them Pass or Catching Them) and the...
As has been mentioned before, the only real difference is that for checked exceptions you have to handle them (by letting them pass or catching them) and the compiler will make sure of it - on the other hand, the handling of unchecked exceptions is optional.
How do you handle unchecked exceptions?
Handling ArrayIndexoutOfBoundException: Try-catch Block we can handle this exception try statement allows you to define a block of code to be tested for errors and catch block captures the given exception object and perform required operations. The program will not terminate.
Must Read
Do unchecked exceptions need to be handled?
Checked exceptions must be explicitly caught or propagated as described in Basic try-catch-finally Exception Handling. Unchecked exceptions do not have this requirement. They don't have to be caught or declared thrown.