Java stream averagingInt by multiple parameters
6
3
I have a class static class Student { private String surname; private String firstName; private String secondName; private int yearOfBirth; private int course; private int groupNumber; private int mathGrade; private int engGrade; private int physicGrade; private int programmingGrade; private int chemistryGrade; And there is a method that adds students to the map for the course public Map<Integer, Double> averageInt(List<Student> students) { Map<Integer, Double> map2 = students.stream() .collect(Collectors.groupingBy(Student::getCourse, Collectors.averagingInt(Student::getEngGrade))); return map2; } However, I need several...