Problem Statement
What methods does the Kotlin compiler automatically generate for data classes?
Explanation
Data classes marked with data keyword automatically generate equals open paren close paren and hashCode open paren close paren for structural equality, toString open paren close paren for readable string representation, copy open paren close paren for creating modified copies, and componentN open paren close paren functions for destructuring. These generated methods are based on properties declared in the primary constructor.
Data classes must have at least one parameter in the primary constructor, and parameters should be val or var to be included in the generated methods. Data classes cannot be abstract, open, sealed, or inner, and they provide all the boilerplate you'd typically write for POJOs or value objects in Java automatically.
