Data Class Limitations
Discover immutable data class properties and primary constructor significance.
We'll cover the following
The idea behind data classes is that they represent a bundle of data; their constructors allow us to specify all this data, and we can access it through destructuring or by copying them to another instance with the copy
method. This is why only primary constructor properties are considered by the methods defined in data classes.
Get hands-on with 1400+ tech skills courses.