# Kotlin Generic Variance Modifiers

DevFeed: [Kotlin Generic Variance Modifiers](<https://devfeed.tech/articles/kotlin-generic-variance-modifiers-39218.md>)

Original publisher: [Read original article](<https://kt.academy/article/ak-variance>)

Published: 2023-02-08T00:15:00Z

Content type: article

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Generic Variance](<https://devfeed.tech/topics/generic-variance.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Contravariance](<https://devfeed.tech/topics/contravariance.md>), [Covariance](<https://devfeed.tech/topics/covariance.md>), [Type Parameter](<https://devfeed.tech/topics/type-parameter.md>)

Tags: [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [variance](<https://devfeed.tech/tags/variance.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

## AI overview

This Kotlin tutorial explains invariant, covariant, and contravariant generic type parameters. It shows how variance affects subtype relationships and why covariance is suitable for read-only types, while mutable structures remain invariant for type safety.

## Source excerpt

What are out and in, and how do we use them without even knowing.