Java Exception Handling MCQ Questions with Answers

Practice Java Exception Handling MCQ questions with answers and improve your understanding of one of the most important concepts in Java programming. This quiz is useful for beginners, software developers, job seekers, and students preparing for interviews, placements, and Java certification exams.

The questions cover important exception handling concepts including checked and unchecked exceptions, try-catch blocks, finally blocks, exception propagation, throws, throw, custom exceptions, and commonly asked Java interview questions. Attempt the quiz below to evaluate your knowledge and strengthen your Java programming skills.

What is Exception Handling in Java?

Exception Handling is a mechanism in Java that allows programs to detect, handle, and recover from runtime errors without terminating unexpectedly. It helps developers build robust applications by managing exceptional situations that may occur during program execution.

Java provides a structured exception handling framework using keywords such as try, catch, finally, throw, and throws. These constructs allow programmers to identify errors, execute recovery logic, and maintain normal program flow even when unexpected conditions occur.

A strong understanding of exception handling is essential for writing reliable software and is frequently tested in technical interviews, certification exams, and coding assessments.

Important Java Exception Handling Concepts



Java Online Mock OCJP Test Series: 4

Topic- Exception Handling in Java

The test consists of 15 questions.

No negative marking for this test.

No Time limit

The pass percentage is 70%

The correct answer with a description will be displayed after the answer has been marked.

Submit the test to calculate your score once you are done with all the questions.

Complexity Level- Easy





Q1: If exception condition is not handled explicitly in a java program, then in case of occurrence of an exception, the uncaught exception will be handled by















Q2: A checked exception is the one that:

Select the correct answer:














Q3: An unchecked exception is the one that:












Q4: 'finally' block will never execute if the 'catch' block is missing

Select True or false











Q5: A 'try' block can have multiple 'catch' blocks

Select True or false











Q6: A 'try' block can have multiple 'finally' blocks?

Select True or False:











Q7: 'catch' and 'finally' both blocks are necessary following the 'try' block

Select True or False:











Q8: 'try', 'catch', 'finally' construct can be nested in any other 'try' or 'catch' or 'finally' blocks

Select True or False











Q9: 'finally' block will never execute if no exception occurs in the 'try' block

Select True or False











Q 10: 'catch' block gets skipped if no exception occurred in the 'try' block

Select True or False











Q11: 'throw' keyword is used to _______














Q12: 'throws' keyword is used to ______














Q13: All exceptions in java are derived from ________














Q14: Exceptions defined by 'Error' and 'RuntimeException' classes and their subclasses are known as














Q15: What will be the output of the below program:


public class exception_example {

public static void main(String[] args) {
div(4,0);
}

public static void div(int a, int b) {

try
{
int x=(a/b);
System.out.println("x="+x);
}

catch(Exception exp) {
System.out.println("Exception caught in catch-1");
}

catch(ArithmeticException e) {
System.out.println("Exception caught in catch-2");
}

}
}



























Why Practice Java Exception Handling MCQs?

Exception handling questions are commonly asked in Java interviews because they test a developer's understanding of error handling, program flow, and application reliability. Many candidates know the syntax but struggle with exception hierarchy and exception propagation concepts.

Regular practice of Java Exception Handling MCQs helps learners identify common mistakes, improve debugging skills, and gain confidence in handling real-world programming scenarios. It also strengthens preparation for placement tests, certification exams, and technical interviews.