Answers for "scala find last element in list"

9

java get last element of list

ArrayList<Integer> list = new ArrayList<Integer>(5); 
int last = list.get(list.size() - 1);
Posted by: Guest on May-30-2020
1

scala last element in list

val mylist: List[String] = List("hello", "world", "!")
println("Last element is: " + mylist.last)
Posted by: Guest on June-03-2021

Code answers related to "scala find last element in list"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language