Understanding data classes

We often create classes that are meant to hold data and nothing else. In these cases, we may often want to override specific methods such as equals() and hashCode() so these data classes can be compared to one another. In Kotlin, this type of class is supported natively.