Kotlin - Null Safety
What is wrong with this Kotlin code?
val message: String? = null println(message.length?.toString())
val message: String? = null println(message.length?.toString())
message is nullable (String?).length directly on a nullable variable without safe call is invalid.message?.length to safely access length.length directly on a nullable variable without safe call -> Option D15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions