Advanced Kotlin
Q97 / 100

What are Kotlin context receivers and their design intent?

Correct! Well done.

Incorrect.

The correct answer is B) An experimental feature declaring that a function requires certain receiver types in scope, enabling capabilities without inheritance

B

Correct Answer

An experimental feature declaring that a function requires certain receiver types in scope, enabling capabilities without inheritance

Explanation

context(Logger, Database) fun saveUser() can only be called where both Logger and Database are in scope, enabling type-safe dependency injection.

Progress
97/100