Type Variance in Java and Kotlin

Featured Imgs 23

“There are three kinds of variance: invariance, covariance, and contravariance…”

It looks pretty scary already, doesn’t it? If we search Wikipedia, we will find covariance and contravariance in category theory and linear algebra. Some of you who learned these subjects in university might be having dreadful flashbacks because it can be complex stuff.