Tag: generics

Generics: The wildcard operator

In the previous part of this tutorial, Polymorphism with generics we have learned the shortcomings of generics while using polymorphism with it.In this part, we are going to overcome them using wildcard operator. Please read this article before continuing. Vehicle…

Generics: Polymorphism with generics

In An Introduction To Generics we learned about declaring and using generics. In this part of the tutorial we are going to learn polymorphism with generics. Consider this declarations.

List is the base type. String is the generic type ArrayList