Ace Java 2025: Rock Your 'Thinking in Java' Challenge!

Question: 1 / 510

What is true about List and List<?> in Java generics?

They are completely the same

List is raw type and List<?> is a wildcard type

List and List<?> are both generic types in Java, however they are not entirely the same. Option A is incorrect because they do have some differences. Option C is incorrect because the wildcard symbol <?> indicates an unspecified type, therefore it cannot be a raw type. Option D is incorrect because both List and List<?> are related as they are both generic types. The correct explanation is that List is known as a raw type since it does not have any generic type arguments specified, while List<?> is a wildcard type which can represent any generic type.

Get further explanation with Examzify DeepDiveBeta

List<?> is raw type and List is a wildcard type

They are unrelated types

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy