Is there any difference between case object and object in scala?
We know objects and "case class" before. But "case object" is a mix of both i.e it is a singleton similar to an object and with a lot of boilerplate as in a case class. The only difference is that the boilerplate is done for an object instead of a class.
case objects won't come with the below ones:
Apply, Un-apply methods. here are no copy methods since this is a singleton. No method for structural equality comparison. No constructor as well.