Java Generics in Java Generics in Java Generics Quiz

Ronald Greer
Ronald Greer
44,790 Points

How come it asks me to type in two type parameters and when I do I get the question wrong

The question asks me to type to basic type parameters and it keeps giving me errors: class Pair <T1, T2> { }

1 Answer

Hi Ronald. Because they want you to use a single uppercase letter, as per the naming convention for generics' type parameters. You can check the Oracle documentation here.

Hope that helps :)