Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Ques. What is Checked Exception and its use in java?
Checked Exception in Java is all those Exception which requires being catches and handled during compile time. If Compiler doesn’t see try or catch block handling a Checked Exception, it throws Compilation error. All the Exception which are direct sub Class of Exception but not inherit RuntimeException are Checked Exception.

Use of Checked Exception:
1) All Operation where chances of failure is more e.g. IO Operation, Database Access or Networking operation can be handled with Checked Exception.
2) When you know what to do (i.e. you have alternative) when an Exception occurs, may be as part of Business Process.
3) Checked Exception is a reminder by compiler to programmer to handle failure scenario.

Example of checked Exception in Java API
Following are some Examples of Checked Exception in Java library:
Is it helpful? Yes No

Most helpful rated by users:

©2020 WithoutBook