How to make a new list with a property of an object which is in another list January 17, 2023 by Tarik Java 8 way of doing it:- List<Integer> idList = students.stream().map(Student::getId).collect(Collectors.toList());