Intermediate Kotlin
Q54 / 100

What is a destructuring declaration?

Correct! Well done.

Incorrect.

The correct answer is B) Unpacking a component into multiple variables: val (a, b) = pair

B

Correct Answer

Unpacking a component into multiple variables: val (a, b) = pair

Explanation

val (name, age) = person unpacks the data class via component1(), component2() functions. Works for data classes, Pairs, and Map entries.

Progress
54/100