Open In App

Find the last element of a 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. we generally use last function to print last element of a list.

Below are the examples to find the last element of a given list in Scala.




Article Tags :