Question - What do you understand by data classes in Kotlin?
Answer -
Data classes are the type of classes that are made to store some data. In Kotlin, it is marked as data. The following is an example of a data class:
data class Developer(val name: String, val age: Int)
When we mark a class as a data class, we don't have to implement or create the following functions like we have to do in Java: hashCode(), equals(), toString(), copy(). The compiler automatically creates these internally, so it also leads to clean code. Although, there are a few other requirements that data classes need to fulfill.