mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
14 lines
262 B
Kotlin
Vendored
14 lines
262 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
fun findUserId(username: String): Long? = null
|
|
|
|
fun main(args: Array<String>) {
|
|
val userId = findUserId("abcd")
|
|
|
|
when (userId) {
|
|
null -> println("User not found")
|
|
else -> println("User ID: $userId")
|
|
}
|
|
}
|
|
|
|
// 0 areEqual |