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.


When using interfaces, what can calling code know about a class?

  1. Implementation details

  2. Private member variables

  3. What methods might be called

  4. The inheritance hierarchy

The correct answer is: What methods might be called

When using interfaces, calling code can know what methods might be called from a class because interfaces define a set of methods that should be implemented by the class. However, calling code cannot know about the implementation details of the class (option A) or access its private member variables (option B). The inheritance hierarchy (option D) can be known, but this is not specific to the use of interfaces.