1 Answer

0 votes
by

Java has two types of exceptions: checked exceptions and unchecked exceptions.

Unchecked exceptions do not need to be declared in a method or a constructor’s throws clause, if they can be thrown by the execution of the method or the constructor, and propagate outside the method or constructor boundary.

On the other hand, checked exceptions must be declared in a method or a constructor’s throws clause.

Source: github.com/snowdream   

Related questions

0 votes
asked Jul 1, 2023 in JAVA by sharadyadav1986
0 votes
asked Sep 9, 2022 in Python by john ganales
...