Case Classes with optional fields in Scala

Viewed 37686

For example, I have this case class:

case class Student (firstName : String, lastName : String)

If I use this case class, is it possible that supplying data to the fields inside the case class are optional? For example, I'll do this:

val student = new Student(firstName = "Foo")

Thanks!

3 Answers
Related