checked type exceptions code example

Example: What are checked Exceptions

1) All the subclasses of Throwable class except error,Runtime Exception and 
its subclasses are checked exceptions.
2) Checked exception should be thrown with keyword throws or should be provided 
try catch block, else the program would not compile. We do get compilation 
error.
Examples :
1) IOException,
2) SQlException,
3) FileNotFoundException,
4) InvocationTargetException,
5) CloneNotSupportedException
6) ClassNotFoundException
7) InstantiationException

Tags:

Misc Example