What does the following code print?
val a : String? = null
val b: String = "Hello World"
println(a==b)
val a : String? = null
val b: String = "Hello World"
println(a==b)A. false
B. Does not compile
C. Nothing, but throws NullPointerException
D. true
Answer: Option A

Join The Discussion