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.


Can enums be inherited from?

  1. Yes

  2. No

The correct answer is: No

Enums can not be inherited from because they are considered to be final or fixed data types. They are used to define a set number of possible values for a variable and are typically not meant to be extended or altered. Attempting to inherit from an enum would defeat their intended purpose and potentially cause issues with code logic. Therefore, enums cannot be inherited from, making option B the correct answer.