Search Header Logo

Tut11 - Exceptions

Authored by Loris Galler

Computers

University

Used 1+ times

Tut11 - Exceptions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Wann tritt eine NullPointerException auf?

  1. Wenn eine Division durch Null erfolgt.

Wenn auf ein Objekt zugegriffen wird, dessen Referenz null ist.

Wenn ein erforderliches Systemressource fehlt.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Was ist der Zweck des finally-Blocks in einem try-catch-Statement?

  1. Um eine weitere Exception zu werfen.

  1. Um die aufgetretene Exception zu deklarieren.

Um eine spezifische Art von Exception zu fangen.

  1. Um Code auszuführen, der immer laufen soll, unabhängig davon, ob eine Exception auftritt oder nicht.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Was wird durch das throw-Keyword in Java erreicht?

  1. Es unterdrückt eine Exception.

  1. Es wird verwendet, um eine Exception zu deklarieren.

  1. Es wird verwendet, um eine spezifische Exception explizit zu werfen.

Es prüft, ob eine Exception auftritt.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Welche der folgenden Aussagen ist wahr über den catch-Block?

  1. Ein catch-Block muss immer auf einen try-Block folgen.

  1. Ein catch-Block kann ohne einen try-Block existieren.

  1. Ein catch-Block wird ausgeführt, bevor der try-Block Code ausführt.

  1. Ein try-Block kann ohne einen catch

-Block existieren.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Welche Art von Exception ist eine ArithmeticException in Java?

  1. Checked Exception

  1. Unchecked Exception

Error

Beides, Checked und Unchecked Exception

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Man kann auch eigene Exception Klassen erstellen

Wahr

Falsch

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Wie viele catch-Blöcke können einem try-Block folgen?

  1. Genau einer.

  1. Höchstens zwei.

  1. So viele wie nötig.

  1. Keiner, wenn ein finally-Block vorhanden ist.

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?