0 votes
in JAVA by
Top 3 difference between checked and unchecked exception in Java

1 Answer

0 votes
by

The difference between checked and unchecked exception in Java?

1) A checked exception is checked by the compiler at compile time. It’s mandatory for a method to either handle the checked exception or declare them in their throws clause. 

2) These are the ones which are a subclass of Exception but doesn’t descend from RuntimeException. The unchecked exception is the descendant of RuntimeException and not checked by the compiler at compile time. 

3) This question is now becoming less popular and you would only find this with interviews with small companies, both investment banks and startups are moved on from this question.

Related questions

0 votes
asked May 30, 2020 in JAVA by Robindeniel
+1 vote
asked Oct 23, 2020 in JAVA by rahuljain1
...