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 keyword is used to define a completely abstract class in Java?

  1. abstract

  2. interface

  3. virtual

  4. AbstractClass

The correct answer is: interface

An abstract class in Java is a class that cannot be instantiated and is used mainly for inheritance. It is used to provide a template for its subclasses to implement or override its abstract methods. Option A, "abstract" is a keyword that is used to define both an abstract class and abstract methods within a class. Option C, "virtual" is not a keyword in Java and is used in some other programming languages. Option D, "AbstractClass" is not a keyword in Java and does not follow the naming convention for classes. Therefore, B is the only correct option.