top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What are checked and unchecked exceptions in Java?

+1 vote
87 views
What are checked and unchecked exceptions in Java?
posted Aug 18, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Exceptions which are inherited from the Exception class are checked exceptions. Programmer/Client code has to handle the checked exceptions thrown by the API, either with try-catch block or with throws clause. i.e. SQLException, IOException.

RuntimeException also extends from Exception. There is no requirement for the Programmer/client code to deal with them, and hence they are called unchecked exceptions. i.e. NullPointerException, DivideByZeroException.

answer Aug 18, 2014 by Salil Agrawal
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...