[The documentation of data class](<https://kotlinl...
# server
j
[The documentation of data class](https://kotlinlang.org/docs/data-classes.html#copying) does imply clearly that copies are shallow. The implementation of this function for the
User
class above would be as follows:
Copy code
fun copy(name: String = this.name, age: Int = this.age) = User(name, age)