You have the following snippet of code:
fun main() {
var firstName = null
val lastName = firstName
firstName = "John"
println("${firstName?.length} ${lastName?.length}")
}
What will it print?
You have the following snippet of code:
fun main() {
var firstName = null
val lastName = firstName
firstName = "John"
println("${firstName?.length} ${lastName?.length}")
}
What will it print?
Create a free account to access the full topic