Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Dive into the depths of Java with our quiz based on "Thinking in Java, Fourth Edition" by Bruce Eckel. Test your knowledge, solidify concepts, and prepare for certification with challenging questions and insightful feedback.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which statement about unchecked exceptions is true?

  1. They're a direct subclass of Exception

  2. They must be caught or declared to be thrown

  3. They are checked at compile time

  4. They inherit from RuntimeException

The correct answer is: They inherit from RuntimeException

RuntimeException is a subclass of Exception that inherits from RuntimeException, and unchecked exceptions are all subclasses of RuntimeException. This means that unlike checked exceptions, which must be caught or declared to be thrown, unchecked exceptions are not required to be handled by code, making option D the most accurate choice. All the other options are incorrect as they either make general statements about checked/unchecked exceptions that do not apply specifically to unchecked exceptions, or they are incorrect statements about the classification of exceptions.