Vidyalelo
Computer Science · Q258

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 258

Q258

What does the following code print? val a : String? = null val b: String = "Hello World" println(a==b)

A.
false
Answer
B.
Does not compile
C.
Nothing, but throws NullPointerException
D.
true

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board