Java. Covariance and contravariance of generic types: an example of ArrayList.

Опубликовано: 02 Июнь 2026
на канале: Sergey Arkhipov Java Tutorials
32,868
2k

In this video, I explain with examples why covariant and contravariant types are needed in Java, and how generic type parameter declarations work with the super and extends keywords. We'll also examine in detail how covariant and contravariant types behave using the ArrayList collection as an example.

Support the channel💰:
https://yoomoney.ru/to/410018856244871

#ArhiTutorialsJava #ityoutubersru