Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for your Java exam with our ultimate quiz based on 'Thinking in Java'. Engage with expertly crafted questions that enhance your learning process. Perfect for Java enthusiasts looking to solidify their knowledge!

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 does List<?> mean?

  1. A list of Objects

  2. A raw list type

  3. A non-raw list of a specific unknown type

  4. A list without any type

The correct answer is: A non-raw list of a specific unknown type

A) A list of Objects is not the same as a list of a specific unknown type. A list of Objects allows for any type of Object to be added to the list, while List<?> only allows for a specific unknown type to be added. B) A raw list type is not the same as List<?>. A raw list type does not have the type specified, whereas List<?> has a specific unknown type specified. D) A list without any type is not the same as List<?>. List<?> denotes a specific unknown type, whereas a list without any type can have any type of Object added to it. List<?> denotes a non-raw list of a specific unknown type. This means that the type of objects in the list is unknown, but the list itself is not a raw type. This allows for type safety while still being able to work with different types of objects