JPRG Topic 2-4: Exception Handling

JPRG Topic 2-4: Exception Handling

University

5 Qs

quiz-placeholder

Similar activities

Java Arrays

Java Arrays

University

10 Qs

Estilo de Código en Java

Estilo de Código en Java

University

10 Qs

Comunicación entre componentes

Comunicación entre componentes

University

10 Qs

Pemrograman Lanjut: Pemrograman Jaringan

Pemrograman Lanjut: Pemrograman Jaringan

University

10 Qs

GDSC Android Bootcamp [Kotlin Quiz]

GDSC Android Bootcamp [Kotlin Quiz]

University

10 Qs

Java Quiz 1

Java Quiz 1

University

10 Qs

CP2 Topic 5

CP2 Topic 5

University

10 Qs

Basic Input and Output in Java

Basic Input and Output in Java

University

5 Qs

JPRG Topic 2-4: Exception Handling

JPRG Topic 2-4: Exception Handling

Assessment

Quiz

Computers

University

Medium

Created by

Alvin Tang

Used 1+ times

FREE Resource

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