Wipro Training Exception Handling and JDBC

Wipro Training Exception Handling and JDBC

University

50 Qs

quiz-placeholder

Similar activities

Quiz sobre Estructura de Datos: Grafos

Quiz sobre Estructura de Datos: Grafos

University

50 Qs

Johnson Controls India Assessment Test 02

Johnson Controls India Assessment Test 02

University

50 Qs

SEMANA 12 - ADMINISTRACION DE OPERACIONE

SEMANA 12 - ADMINISTRACION DE OPERACIONE

University

54 Qs

Data Manegment

Data Manegment

University

54 Qs

Wipro Training Exception Handling and JDBC

Wipro Training Exception Handling and JDBC

Assessment

Quiz

Engineering

University

Hard

Created by

Ms.Yatri Davda

Used 2+ times

FREE Resource

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

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?