# Using the Kotlin when Expression

DevFeed: [Using the Kotlin when Expression](<https://devfeed.tech/articles/using-when-expression-in-kotlin-the-switch-with-super-powers-kad-13-27237.md>)

Original publisher: [Read original article](<https://antonioleiva.com/when-expression-kotlin>)

Published: 2017-02-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [condition](<https://devfeed.tech/tags/condition.md>), [examples](<https://devfeed.tech/tags/examples.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [types](<https://devfeed.tech/tags/types.md>), [when-expression](<https://devfeed.tech/tags/when-expression.md>)

## AI overview

A tutorial on Kotlin's when expression, covering regular use, alternative branches, automatic casting, range and list checks, argument-free conditions, and returning values. It also includes an Android example involving event handling.

## Source excerpt

Everything Android, Kotlin and other random topics