Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

get last index of list scala

val mylist: List[String] = List("Geeks", "For", "geeks", "is", "best") 
println("Last element is: " + mylist.last) 

> Last element is: best
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #index #list #scala
ADD COMMENT
Topic
Name
5+5 =