In short: a data class is a normal class where the compiler writes five things for you: equals() , hashCode() , toString() , copy() and component1() , component2() and so on.