Back to Top

Wednesday, 18 January 2012

JAVA: Checked and UnChecked Exception

In Java, there are lots of sub-classes under java.lang.Exception class. we can divide these sub-classes into 2 types on the basis of compile-time checking.
The types are - Checked Exception  & Unchecked Exception.

Checked Exception: 
  • Except RuntimeException( java.lang.RuntimeException) class, all sub-classes of Exception are checked exception.
  • These exceptions need to include in a method's throws list, because these are checked by the compiler during compile time if a method handles or throws these exception. 


Unckecked Exception:
  • RuntimeException and its sub-classes are called as unchecked exception.
  • We don't need to include in a method's throws list, because these are not checked by the compiler during compile time.

1 Responses to “ JAVA: Checked and UnChecked Exception ”

Naviya Nair said...
24 October 2016 at 15:14

I have read your blog its very attractive and impressive. I like it your blog.

Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai

Online Java Training Java 8 Online Training | Java J2EE Online Training | JavaEE Training Institute in Chennai Java Training Institutes

Java Training Institutes in Chennai Java Training in Chennai


Post a Comment

Popular Posts

Subscribe via Email
Subscribe Java Interview Questions via Email
All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar
blog links Web Directory Academics Blogs