Checked and Unchecked Exceptions

Anjali Bhavan

 

Java's Throwable Class

1. Contains all possible errors and exceptions in Java.

2. Has two categories: Error class and Exception class.

3. Difference between error and exception?

Checked Exceptions

1. Checked during compile time

2. Either must be handled (using try-catch) or specified using "throws"

 

Unchecked Exceptions

1. Not checked during compile time

2. Useful if you want to just get the program compiled without any problems

Checked or Unchecked Exceptions?

javaexceptions

By Anjali Bhavan

javaexceptions

  • 411