January 2018
Intermediate to advanced
434 pages
14h 1m
English
In the last recipe, we learned how to use data class and how it reduces a lot of boilerplate code. In this recipe, we will see how data class makes it easy to copy another data class, even if you have to modify the property.
A brute-force mechanism to copy a data class can be to just create a data class by duplicating all the properties, but using the copy method will make it much easier.
Read now
Unlock full access