Vidyalelo
Java Programming · Q17

Java Generics

Programming · Java Programming · question 17

Q17

In Java generics, what is the purpose of the `? extends T` wildcard?

A.
It represents an unknown type
B.
It allows any type to be used as a generic
C.
It restricts the generic type to be a subclass or the same as `T`
Answer
D.
It specifies a return type

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board