Scala: How to create a case class with multiple alternate constructors alvin April 28, 2018 - 3:28pm

As a brief note today, if you want to see how to create a Scala case class that defines multiple alternate constructors, I hope this example is helpful:

How to create multiple class constructors in Scala

Scala constructors FAQ: How do I create a Scala class with multiple constructors (secondary constructors)?

The Scala approach to defining multiple class constructors is a little different than Java, but somewhat similar. Rather than try to explain this in words, I just created some example source code to demonstrate how this works.

Here's some source code to demonstrate the Scala "multiple constructors" approach: