Search Header Logo

Java Exception Handling MCQs

Authored by DR MURTHY

Computers

12th Grade

Used 4+ times

Java Exception Handling MCQs
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the base class for all exceptions in Java?

Object

Throwable

Exception

RuntimeException

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to manually throw an exception in Java?

throw

throws

try

catch

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a checked exception?

ArrayIndexOutOfBoundsException

IOException

NullPointerException

ArithmeticException

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which block is used to handle exceptions in Java?

finally

try

catch

throw

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if an exception is not handled in a Java program?

The program will terminate abnormally

The program will continue execution

The exception will be ignored

The program will enter an infinite loop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an unchecked exception?

FileNotFoundException

IOException

NullPointerException

SQLException

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The finally block in Java is used for:

Handling exceptions

Ensuring code is executed whether an exception occurs or not

Declaring exceptions

Throwing exceptions

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?