digital-garden/notes/Собеседования/Задачи/Задача 7.md
2024-06-13 21:01:37 +03:00

462 B

parents
Вопросы для собеседование Java
final Stream<Worker> developerStream = workers.stream()
                .filter(worker -> Workers.DEVELOPER.equals(worker.getPosition()));

final List<Worker> developers = developerStream
                .collect(Collectors.toList());

final List<Worker> twoDevelopers = developerStream
                .filter(worker -> worker.getAge() > 30)
                .toList();