Scala case classes are like regular classes except for the fact that they are good for modeling immutable data and serve as useful in pattern matching. Case classes include public and immutable parameters by default. These classes support pattern matching, which makes it easier to write logical code. The following are some of the characteristics of a Scala case class:
Instances of the class can be created without the new keyword.
As part of the case classes, Scala automatically generates methods such as equals(), hashcode(), and toString().
Scala generates accessor methods for all constructor arguments for a case class.