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 allows you to look up an object using another object?

  1. Map

  2. Set

  3. List

  4. Queue

The correct answer is: Map

A Map is an abstract data type that stores key-value pairs and allows you to retrieve a value using its corresponding key. This is useful when you need to quickly search for a specific value and know its corresponding key. Sets do not have key-value pairs and are mainly used for membership checking. Lists and Queues do not allow you to search for an object by using another object. Therefore, the most appropriate answer is Map.