Vidyalelo
Computer Science · Q264

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 264

Q264

This code does not print any output to the console. What is wrong? firstName?.let println("Greeting firstname!")

A.
A null pointer exception is thrown
B.
firstName is equal to null
Answer
C.
firstName is equal to an empty string
D.
firstName is equal to Boolean false

Answer: Option B

Solution

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