Search Header Logo

Wipro Training Exception Handling and JDBC

Authored by Ms.Yatri Davda

Engineering

University

Used 2+ times

Wipro Training Exception Handling and JDBC
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which class is the superclass of all exceptions?

Error 

Throwable

Exception

RuntimeException

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which keyword is used to handle exceptions?

try

catch 

finally

All of the above

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output?

try {

int a = 10 / 0;

} catch (ArithmeticException e) {

System.out.println("Divide by zero");

}

Compile-time error

Runtime error

Divide by zero

No output

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Can we catch multiple exceptions in a single catch block in Java 7+?

Yes

No

Only with checked exceptions

Only with RuntimeException

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which is a checked exception?

ArithmeticException

NullPointerException

IOException

ArrayIndexOutOfBoundsException

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of finally block?

Handles exceptions

Executes only on error

Executes always

Optional block

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which block executes regardless of exception?

try

catch

throw

finally

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?