double salaryThreshold = 1000; long nums = 2; long result = employeeList.stream() .filter(employee -> employee.getSalary() > salaryThreshold) .collect(Collectors.groupingBy(Employee::getDepartment, Collectors.counting())) .values().stream() .filter(aLong -> aLong > nums) .count();
点赞 评论

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务