Files
kotlin-for-java-developers/src/Run.kt

7 lines
174 B
Kotlin
Raw Normal View History

fun main() {
// Similar to with but can be used with nullable values
val uppercase = nullableString()?.run { uppercase() }
}
fun nullableString(): String? = "Hello"