What is in and out in Kotlin?

If you ever defined generic in Kotlin, you’ll notice many a times, it would propose to use the in or out keyword to define the generic. It puzzles me at a start on when which is used, and for what. Formally, this is a way to define contravariance and covariant.

Sizin İçin Seçtik  Why do we use Kotlin?

Leave a Reply

Your email address will not be published. Required fields are marked *