Scala / Scala interview questions
Can we reassign the parameter value for case class?
No. When you create a case class with parameters, the parameters are public val implicitly and the parameter becomes immutable. It is possible to use var keyword in case classes but this is discouraged.
More Related questions...