Kotlin - Null Safety
What is the output of this Kotlin code?
val number: Int? = 5
number?.let { println(it * 2) }val number: Int? = 5
number?.let { println(it * 2) }number holds 5, which is not null, so ?.let runs.it (5) by 2 and prints 10.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions