1. What does the ? operator mean in Kotlin type declarations?
The question mark operator in type declarations like String? makes the type nullable, meaning the variable can hold either a value of that type or null. By default, Kotlin types are non-nullable, which eliminates most NullPointerException errors at compile time. To work with nullable types, you use safe call operators like question mark dot for safe access, elvis operator question mark colon for default values, or not-null assertion operator double exclamation for forcing non-null. This null safety system is one of Kotlin's most powerful features preventing null reference errors.