Java-Quiz: Checked vs Unchecked Exceptions

This Java quiz tests the difference between checked exceptions like IOException and unchecked ones like NumberFormatException. You will predict output, spot code that does not compile and decide what a method may declare with throws.

Mittel 10 Fragen ~6 Minuten Bestanden ab 80% Java 17

Modus wählen

Du spielst als Gast: Melde dich an, damit XP und Serie gespeichert werden.

Beispielfrage

Frage 1 von 10

Which of these is a checked exception?

Lösung zeigen

B. IOException IOException extends Exception but not RuntimeException, so the compiler makes you catch or declare it. The other three extend RuntimeException, which makes them unchecked.

Darum geht es in diesem Quiz

  • Checked exceptions vs RuntimeException and its subclasses
  • Declaring with throws and the "catch or declare" rule
  • Wrapping a checked exception with a cause
  • Catch order, multi-catch and exception subclasses
  • Checked exceptions inside lambdas and overriding methods

Häufige Fragen

Brauche ich ein Konto?

Nein. Jeder kann spielen. Mit Anmeldung werden XP, Serie, Abzeichen und Verlauf gespeichert.

Kann ich es wiederholen?

Ja. Dein Bestwert bleibt erhalten, und Fragen und Antworten werden jedes Mal neu gemischt.