Scala – Match expressions






In Scala match expressions are used to select between a list of alternatives same as multiple if-statements or select statement, if you are familiar with java.

Example
Scala as statement

Scala as expressions


Apache Spark and Scala Certification Training