Questions tagged [covariance]
The concepts of covariance, contravariance, and invariance help understand how the hierarchy of type inheritance can be affected by different transformations, like implementing generics. Covariance retains the same ordering as the original hierarchy, while contravariance reverses it. On the other hand, invariance completely breaks the existing hierarchy structure.