Chapter 11. Advanced Generics
In this chapter, we will dive deep into parametric polymorphism and how Java 9 allows us to write generic code with classes that use two constrained generic types. We will:
Work with more advanced scenarios in which we take advantage of parametric polymorphism
Create a new interface to be used as a constraint for a second type parameter
Declare two classes that implement an interface to work with two type parameters
Declare a class that works with two constrained generic types
Use a generic class with two generic type parameters