Pregunta de entrevista de Mphasis

Find the max marks for each department

Respuesta de la entrevista

Anónimo

9 ene 2025

= studentList.stream().collect(Collectors.groupingBy(Student::getDepartment, Collectors.max(Comparator.comparing(Student::getMarks))));