Kotlin - Null Safety
Identify the error in this Kotlin code:
val name: String? = "Kotlin"
name.let { println(it.length) }val name: String? = "Kotlin"
name.let { println(it.length) }name is nullable, but let is called without safe call ?..let directly on nullable can cause NullPointerException if name is null.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions