how can i handle the un checked exceptions in java

  Aug 6, 2015

i need how to handle and examples of this

Solved 0
core java java 2 years ago 1 Answer 25 views

Answers ( 1 )

  1. 2 years ago

    The only difference between checked and unchecked exceptions is that checked ones have to be either caught or declared in the method signature usingnt throws, whereas with unchecked ones this is optional.

    Unchecked Exception cant be handled by your code i.e. we cant use try/catch block

    Sure we can - but we dont have to.

    Solution

    Yes, you can throw unchecked exceptions withthrow. And yes, you can catch unchecked exceptions in anb catch block.

Your Answer