Kotlin - Null Safety
Given
var input: String? = "123", which code safely converts it to an integer or returns 0 if null or invalid?var input: String? = "123", which code safely converts it to an integer or returns 0 if null or invalid??. to avoid calling toInt() on null.?: 0 returns 0 if the left side is null.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions