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 656 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
3
Write a Kotlin program that evaluates an arithmetic expression.4
Create a data class with a vip property implementing the Human interface5
Kotlin: Compile the following code and see the error.6
Write a function that returns the maximum of two integers in Kotlin2
Write a Kotlin code that prints 7 to the console.10
How to flatten a list of lists in Kotlin2
In Kotlin, adding an element to a list does not change the list.