Problem Statement
What does the ?: (Elvis operator) do in Kotlin?
Explanation
The Elvis operator question mark colon provides a concise way to handle null values by returning the left operand if it's not null, or the right operand if the left is null. It's commonly used with safe call operators like val length equals name question mark dot length question mark colon 0 which returns the string length or 0 if name is null. This operator is named Elvis because the question mark colon looks like Elvis Presley's hairstyle when viewed sideways. It's more readable than traditional if-null checks and helps write null-safe code concisely.
