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.
Last Updated :
17 Apr, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...