Based on the following answer: https://stackoverflow.com/a/30202075/8760211
How to sort each group by stud_id and then return a List with all Students as result of the g
You can add one line:
studlistGrouped.values().forEach(list -> list.sort(Comparator.comparing(Student::getId)));
Or you can write your own collector.
I know which one I would choose.