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.


In generics, what does the '?' symbol represent?

  1. Any class that extends Number

  2. A specific type that must be defined

  3. An unknown type, also known as a wildcard

  4. A Boolean value indicating the presence of a type

The correct answer is: An unknown type, also known as a wildcard

The '?' symbol in generics represents an unknown type, also known as a wildcard. This allows for greater flexibility in defining type parameters and allows methods to be used more generally. Option A is incorrect because it is a limited definition and only includes classes that extend Number. Option B is incorrect because it contradicts the purpose of utilizing a wildcard in generics. Option D is incorrect because it does not accurately describe the purpose of the '?' symbol in generics.