Java Exception Handling MCQs

Java Exception Handling MCQs

12th Grade

20 Qs

quiz-placeholder

Similar activities

CompuScholar Chapter 11

CompuScholar Chapter 11

9th - 12th Grade

20 Qs

CHAPTER 9 AND 10

CHAPTER 9 AND 10

12th Grade

20 Qs

Mastering Exception Handling in Java

Mastering Exception Handling in Java

12th Grade

15 Qs

PCEP Section 4D: Basics of Python Exception Handling

PCEP Section 4D: Basics of Python Exception Handling

12th Grade

15 Qs

2ND QTR-QUIZ 7-JAVA FINALIZERS-12-14-2022

2ND QTR-QUIZ 7-JAVA FINALIZERS-12-14-2022

12th Grade

20 Qs

Java-Chapter 10 Exam

Java-Chapter 10 Exam

9th - 12th Grade

20 Qs

20.2 File Processing and Exception Handling Cambridge iA 9618

20.2 File Processing and Exception Handling Cambridge iA 9618

12th Grade

20 Qs

AP CSA Midterm Concept Review 1

AP CSA Midterm Concept Review 1

12th Grade

20 Qs

Java Exception Handling MCQs

Java Exception Handling MCQs

Assessment

Quiz

Computers

12th Grade

Hard

Created by

DR MURTHY

Used 3+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?