Stats

298 Contributors: 15
2017-01-18
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Case Classes

Download scala eBook

Syntax

  • case class Foo() // Case classes with no parameters must have an empty list
  • case class Foo(a1: A1, ..., aN: AN) // Create a case class with fields a1 ... aN
  • case object Bar // Create a singleton case class

Related Examples