Kotlin - Null Safety
Identify the error in this Kotlin code snippet:
fun main() {
val number: Int = null
println(number)
}fun main() {
val number: Int = null
println(number)
}null, which is not allowed.null, so this causes a compilation error.null assignments [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions