Search Header Logo

Day 6 - Exception Handling

Authored by Prof. Karale

Computers

University

Used 2+ times

Day 6 - Exception Handling
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is an exception in Java?

An error in the code
A runtime error
A logical error
A compile-time error

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a checked exception?

NullPointerException
ArrayIndexOutOfBoundsException
IOException
ArithmeticException

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which keyword is used to handle exceptions?

catch

try

both try & catch

throws

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which block is always executed?

try
catch
finally
throw

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which keyword is used to throw an exception manually?

throws
throw
final
try

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these is a superclass of all exceptions?

Throwable
Error
Exception
RuntimeException

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the use of throws keyword?

To throw multiple exceptions
To declare exceptions
To catch exceptions
To ignore 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?