15 lines
462 B
Markdown
15 lines
462 B
Markdown
---
|
|
parents:
|
|
- "[[Вопросы для собеседование Java]]"
|
|
---
|
|
```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();
|
|
``` |