Examveda

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

D. The safe call operator is used for nullable expressions

Answer: Option C


This Question Belongs to Computer Science >> Kotlin Program

Join The Discussion

Related Questions on Kotlin Program

What is Kotlin?

A. A new version of Java.

B. A JavaScript framework.

C. A statically-typed programming language for the JVM, Android, and browser.

D. A database management system.