scala-case-classes

Scala Case Class
Scala Case Class

Scala case classes are good for modeling immutable data with added benefit of pattern matching.
No need of instantiating with new keyword, underlying apply method will take of instantiating and assigning values
Objects are immutable as every parameter is value by default, you can change it to variable type if required
Default value to parameters are allowed.

Case class example in Scala



Comments

Popular posts from this blog

hadoop-installation-ubuntu

jenv-tool

hive-installation-in-ubuntu