Beginner Kotlin
Q8 / 100

What does the safe call operator ?. do?

Correct! Well done.

Incorrect.

The correct answer is B) Calls a method only if the receiver is not null; otherwise returns null

B

Correct Answer

Calls a method only if the receiver is not null; otherwise returns null

Explanation

str?.length returns null if str is null rather than throwing a NullPointerException.

Progress
8/100