Question from the Kotlin test

Use destructuring to extract the name and age of a User object

Hard

Considering the User class with 2 properties : name: String and age: Int.

val lucie = User("Lucie", 35)
val (name, age) = lucie

Using lucie like this

Author: W3D TeamStatus: PublishedQuestion passed 588 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!