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.


What kind of methods in Java do not behave polymorphically?

  1. Abstract methods

  2. Final methods

  3. Public methods

  4. Protected methods

The correct answer is: Final methods

Final methods in Java do not behave polymorphically because they cannot be overridden in the subclasses. Therefore, only the original method defined in the superclass will be executed, regardless of the subclass instance used to call the method. This means that the behavior of the method cannot be changed in different subclasses, making it non-polymorphic. Abstract methods, on the other hand, must be overridden in subclasses and therefore have multiple implementations, making them polymorphic. Public and protected methods can be overridden and have different implementations in subclasses, making them also behave polymorphically.