English, asked by sri409935, 4 months ago

what happens if you explicitly provide equal function to a data class​

Answers

Answered by khanabdulrahman30651
0

Answer:

I have a car data class data class Car(var id: Int, var maker: String, var wheels: Int) … ... check if this.prop1 equals to that.prop1 (by invoking equals method ... What you want to do is either make a copy of car1 or just create another object ... Mark the class as @Serializable or provide the serializer explicitly.

Explanation:

Similar questions