#257 Grouping Active Persons by Name

Companies:
Sberbank
Themes:
JavaStreams & LambdasPractice

There is a collection of persons. Group active persons older than 25 by name:

Java
@Getter
class Person {
    private String name;
    private Integer age;
    boolean active;

    public Person(String name, Integer age, boolean active) {
        this.name = name;
        this.age = age;
        this.active = active;
    }
}
Text
var result = personList.stream()...

Question review

Mentor
Answer as you would in a real interview. I’ll ask follow-up questions, then compare your answer with the reference answer and show your accuracy as a %.
Sign in to start the dialogue The mentor keeps the context of the current question and your previous messages.
Sign in