Loading practice questions
What does the Elvis operator (?:) do in Kotlin?
Correct Answer: D — Provides a default value if the left-hand expression is null
Explanation:
The Elvis operator (?:) provides a default value when the left-hand expression evaluates to null, e.g., val result = value ?: "Default".