type erasure1 article
It’s possible to use type erasure generics in a method with Java. To know how to use generics is important because then you are able to create highly reusable code.
In the following Java Challenge, you will see the generic type that will be erased by the compiler and then will be replaced by the type we defined at runtime.
Note also that we are using the extends keyword which means that the generic type will extend the other type.
Without further ado, it’s time to solve the Java Challenge quiz!