This code does not print any output to the console. What is wrong?
firstName?.let {
println("Greeting $firstname!")
}
firstName?.let {
println("Greeting $firstname!")
}A. A null pointer exception is thrown
B. firstName is equal to null
C. firstName is equal to an empty string
D. firstName is equal to Boolean false
Answer: Option B

Join The Discussion