Vidyalelo
Computer Science · Q134

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 134

Q134

What is the difference between the safe call operator (?.) and the non-null assertion operator (!!)?

A.
The safe call operator returns null if the expression is null
B.
The safe call operator throws an exception if the expression is null
C.
The safe call operator performs a null-check before accessing the expression
Answer
D.
The safe call operator is used for nullable expressions

Answer: Option C

Solution

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