Intermediate
Kotlin
Q84 / 100
What is Kotlin's type-safe builder pattern?
Correct! Well done.
Incorrect.
The correct answer is B) A DSL approach using receiver lambdas (T.() -> Unit) to create structured, readable object configuration DSLs
B
Correct Answer
A DSL approach using receiver lambdas (T.() -> Unit) to create structured, readable object configuration DSLs
Explanation
html { body { p { +"Hello" } } } uses type-safe builders. Each function accepts a receiver lambda, scoping available methods to the context object.
Progress
84/100