Java_Exception

Java_Exception

University

10 Qs

quiz-placeholder

Similar activities

CSE_A1_QUIZ 6(15-05-23)

CSE_A1_QUIZ 6(15-05-23)

University

13 Qs

Javascript

Javascript

University

10 Qs

Exception Handling

Exception Handling

University

7 Qs

Java Arrays

Java Arrays

University

10 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

Exception handling -oracle plsql

Exception handling -oracle plsql

University

15 Qs

Java Quiz 1

Java Quiz 1

University

10 Qs

Talent Next Java MCQ-1

Talent Next Java MCQ-1

University

10 Qs

Java_Exception

Java_Exception

Assessment

Quiz

Computers

University

Hard

Created by

lawrance r

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an exception in Java?

A syntax error in the program

A runtime error that disrupts program execution

A type of loop in Java

A type of method used for debugging

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if an exception is not caught in Java?

The program will continue executing

The compiler will fix the exception automatically

The program will terminate abnormally

The Java Virtual Machine (JVM) will ignore it

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which block is always executed, regardless of whether an exception occurs or not?

try

catch

finally

throws

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an unchecked exception in Java?

IOException

FileNotFoundException

SQLException

NullPointerException

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many catch blocks can a single try block have?

Only one

Multiple

Two

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of the catch block in Java?

It executes the code after an exception is thrown

It catches and handles exceptions

It forces exceptions to occur

It prevents compilation errors

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a try block exist without a catch block?

No

Yes, but it must have a finally block

Yes, without any condition

Yes, if the method has a throws clause

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?