How can I get the last element of a stream or list in the following code?
Where data.careas is a List:
data.careas
List
CArea f
One liner (no need for stream;):
Object lastElement = list.get(list.size()-1);