Imagine that I have a list of certain objects:
List
And I need to generate another list including the ids of
ids
Java 8 way of doing it:-
List idList = students.stream().map(Student::getId).collect(Collectors.toList());