List<Student> uniqueMStudentList = studentList.stream().collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Student::name))), ArrayList::new)
);
List<Student> uniqueMStudentList = studentList.stream().collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Student::name))), ArrayList::new)
);