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 505 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!