How to get the first element of List in Scala
In Scala, list is defined under scala.collection.immutable package. A list is a collection of same type elements which contains immutable data. Let's see how to get the first element of given List in Scala.List in Scala contains many suitable methods to perform simple operations like head(), tail(),