Search Header Logo

JPRG Topic 2-4: Exception Handling

Authored by Alvin Tang

Computers

University

Used 1+ times

JPRG Topic 2-4: Exception Handling
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many catch blocks can a try block have?

Only one catch block to each try block.

As many different types of exceptions there can be.

Two.

None.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When is the finally-block executed in exception handling code?

Always.

Never.

Almost always.

Almost never.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Java's exception handling mechanism handles _ errors.

Syntax

Runtime

Logical

Computational

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT an example that you can use finally-blocks for?

Close files

Close databases

Reverse time

Revert user changes

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Running 8/0 in Java will yield _

java.lang.ArithmeticException

java.lang.NumberFormatException

No errors/exceptions

java.lang.ArrayIndexOutOfBounds

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?