Kotlin - Null Safety
What is the output of this Kotlin code?
val text: String? = "Hello"
text?.let { println(it.lowercase()) }val text: String? = "Hello"
text?.let { println(it.lowercase()) }text is "Hello", not null, so let block runs.it.lowercase() converts "Hello" to "hello" and prints it.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions