Quiz on Java Generics Wildcards Guidelines



1. What is the purpose of wildcards in Java Generics?
2. Which wildcard is used to represent an unknown type that can be any type?
3. What does the wildcard <? extends T> indicate?
4. How does the wildcard <? super T> function in Java Generics?
5. Which of the following is true about using wildcards in method parameters?

Advertisements